]> granicus.if.org Git - php/commit
Fix #61642: modify("+5 weekdays") returns Sunday
authorDmitri Iouchtchenko <johnnyspoon@gmail.com>
Sun, 29 Jul 2012 17:41:40 +0000 (13:41 -0400)
committerStanislav Malyshev <stas@php.net>
Mon, 6 Aug 2012 02:22:36 +0000 (19:22 -0700)
commita6a7787cf25af0cf5b5672b677e20d9d40963137
tree0a73453163c307513396f6648df467d513211727
parent9c0a3272e77e86b973120feba190d896272396d1
Fix #61642: modify("+5 weekdays") returns Sunday

Adding a non-zero multiple of 5 weekdays to any Friday, Saturday, or
Sunday would result in a Sunday instead of the correct date. This patch
provides an implementation of do_adjust_special_weekday() which does
not suffer from this issue.
ext/date/lib/tm2unixtime.c
ext/date/tests/bug61642.phpt [new file with mode: 0644]