summaryrefslogtreecommitdiff
path: root/ext/date/lib/timelib.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2008-02-03 14:15:07 (GMT)
committerDerick Rethans <derick@php.net>2008-02-03 14:15:07 (GMT)
commita61e5f897cea7b97a9a3829061cfffc09267a438 (patch)
treec733271a7d86701510ec70acbae23b4c9e4c6b3f /ext/date/lib/timelib.c
parent2cc49ecfb2cf08ec826c3754a1e5d8090dcc1b77 (diff)
downloadphp-a61e5f897cea7b97a9a3829061cfffc09267a438.tar.gz
- MFH: Support "first/last day of <month>" style texts.
Diffstat (limited to 'ext/date/lib/timelib.c')
-rw-r--r--ext/date/lib/timelib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c
index 257a24a..c6e019a 100644
--- a/ext/date/lib/timelib.c
+++ b/ext/date/lib/timelib.c
@@ -203,6 +203,16 @@ void timelib_dump_date(timelib_time *d, int options)
if (d->have_relative) {
printf("%3lldY %3lldM %3lldD / %3lldH %3lldM %3lldS",
d->relative.y, d->relative.m, d->relative.d, d->relative.h, d->relative.i, d->relative.s);
+ if (d->relative.first_last_day_of != 0) {
+ switch (d->relative.first_last_day_of) {
+ case 1:
+ printf(" / first day of");
+ break;
+ case 2:
+ printf(" / last day of");
+ break;
+ }
+ }
}
if (d->have_weekday_relative) {
printf(" / %d.%d", d->relative.weekday, d->relative.weekday_behavior);