/php-src/ext/date/lib/ |
H A D | astro.c | 34 (367L*(y)-((7*((y)+(((m)+9)/12)))/4)+((275*(m))/9)+(d)-730530L) 52 #define atan2d(y,x) (RADEG*atan2(y,x)) argument 151 y = sqrt(1.0 - e*e) * sind(E); in astro_sunpos() 152 *r = sqrt(x*x + y*y); /* Solar distance */ in astro_sunpos() 162 double lon, obl_ecl, x, y, z; in astro_sun_RA_dec() local 169 y = *r * sind(lon); in astro_sun_RA_dec() 175 z = y * sind(obl_ecl); in astro_sun_RA_dec() 176 y = y * cosd(obl_ecl); in astro_sun_RA_dec() 179 *RA = atan2d(y, x); in astro_sun_RA_dec() 180 *dec = atan2d(z, sqrt(x*x + y*y)); in astro_sun_RA_dec() [all …]
|
H A D | dow.c | 35 tmp = x % y; in positive_mod() 37 tmp += y; in positive_mod() 56 y1 = positive_mod(y, 100); in timelib_day_of_week_ex() 109 *iy = y - 1; in timelib_isoweek_from_date() 116 *iy = y; in timelib_isoweek_from_date() 119 if (*iy == y) { in timelib_isoweek_from_date() 124 *iy = y + 1; in timelib_isoweek_from_date() 130 if (*iy == y) { in timelib_isoweek_from_date() 167 *y = iy; in timelib_date_from_isodate() 172 *y -= 1; in timelib_date_from_isodate() [all …]
|
H A D | interval.c | 49 ((*one)->y > (*two)->y) || in sort_old_to_new() 50 ((*one)->y == (*two)->y && (*one)->m > (*two)->m) || in sort_old_to_new() 51 ((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d > (*two)->d) || in sort_old_to_new() 52 …((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h > (*two)-… in sort_old_to_new() 53 …((*one)->y == (*two)->y && (*one)->m == (*two)->m && (*one)->d == (*two)->d && (*one)->h == (*two)… in sort_old_to_new() 88 rt->y = two->y - one->y; in timelib_diff_with_tzid() 159 rt->y = two->y - one->y; in timelib_diff() 223 t->relative.y = interval->y * bias; in timelib_add() 252 t->relative.y = 0 - (interval->y * bias); in timelib_sub() 303 t->relative.y = interval->y * bias; in timelib_add_wall() [all …]
|
H A D | parse_date.c | 4132 s->time->y = 1970; in scan() 7799 s->time->y = 1970; in scan() 7843 s->time->relative.y = 0 - s->time->relative.y; in scan() 11092 s->time->y = timelib_get_nr(&ptr, 4); in scan() 24886 in.time->y = TIMELIB_UNSET; in timelib_strtotime() 24940 time->y = 1970; in timelib_time_reset_fields() 24952 if (time->y == TIMELIB_UNSET ) time->y = 1970; in timelib_time_reset_unset_fields() 25057 in.time->y = TIMELIB_UNSET; in timelib_parse_from_format_with_map() 25138 if (s->time->y == TIMELIB_UNSET) { in timelib_parse_from_format_with_map() 25146 if (s->time->y != TIMELIB_UNSET) { in timelib_parse_from_format_with_map() [all …]
|
H A D | parse_date.re | 1217 s->time->y = 1970; 1256 s->time->y = 1970; 1798 s->time->relative.y = 0 - s->time->relative.y; 2036 in.time->y = TIMELIB_UNSET; 2090 time->y = 1970; 2102 if (time->y == TIMELIB_UNSET ) time->y = 1970; 2154 {'y', TIMELIB_FORMAT_YEAR_TWO_DIGIT}, 2207 in.time->y = TIMELIB_UNSET; 2288 if (s->time->y == TIMELIB_UNSET) { 2296 if (s->time->y != TIMELIB_UNSET) { [all …]
|
H A D | parse_iso_intervals.c | 293 case 'Y': s->period->y = nr; break; in scan() 668 s->period->y = timelib_get_unsigned_nr(&ptr, 4); in scan() 825 current->y = timelib_get_nr(&ptr, 4); in scan() 978 in.begin->y = TIMELIB_UNSET; in timelib_strtointerval() 991 in.end->y = TIMELIB_UNSET; in timelib_strtointerval() 1004 in.period->y = 0; in timelib_strtointerval()
|
H A D | parse_iso_intervals.re | 232 current->y = timelib_get_nr(&ptr, 4); 262 case 'Y': s->period->y = nr; break; 289 s->period->y = timelib_get_unsigned_nr(&ptr, 4); 373 in.begin->y = TIMELIB_UNSET; 386 in.end->y = TIMELIB_UNSET; 399 in.period->y = 0;
|
H A D | parse_posix.c | 479 static timelib_sll count_leap_years(timelib_sll y) in count_leap_years() argument 483 y--; in count_leap_years() 485 return (y/4) - (y/100) + (y/400); in count_leap_years() 549 year = dummy.y; in timelib_fetch_posix_timezone_offset()
|
H A D | parse_tz.c | 483 t->y, t->m, t->d, in format_ut_time()
|
H A D | timelib.c | 36 #define TIMELIB_LLABS(y) (y < 0 ? (y * -1) : y) argument 311 d->sse, d->y < 0 ? "-" : "", TIMELIB_LLABS(d->y), d->m, d->d, d->h, d->i, d->s); in timelib_dump_date() 341 d->relative.y, d->relative.m, d->relative.d, d->relative.h, d->relative.i, d->relative.s); in timelib_dump_date() 379 d->y, d->m, d->d, d->h, d->i, d->s, d->days, d->invert ? " inverted" : ""); in timelib_dump_rel_time()
|
H A D | timelib.h | 224 timelib_sll y, m, d; /* Years, Months and Days */ member 252 timelib_sll y, m, d; /* Year, Month, Day */ member 462 timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); 465 timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); 469 timelib_sll timelib_day_of_year(timelib_sll y, timelib_sll m, timelib_sll d); 475 timelib_sll timelib_days_in_month(timelib_sll y, timelib_sll m); 478 void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iw, timeli… 482 void timelib_isodate_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iy, timeli… 485 void timelib_date_from_isodate(timelib_sll iy, timelib_sll iw, timelib_sll id, timelib_sll *y, time… 493 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d); [all …]
|
H A D | timelib_private.h | 105 #define timelib_is_leap(y) ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) argument
|
H A D | tm2unixtime.c | 57 (*y)++; in inc_month() 66 (*y)--; in dec_month() 137 previous_year = (*y); in do_range_limit_days() 212 ddd = g - ((365*y) + (y/4) - (y/100) + (y/400)); in magic_date_calc() 214 y--; in magic_date_calc() 215 ddd = g - ((365*y) + (y/4) - (y/100) + (y/400)); in magic_date_calc() 219 y = y + (mi + 2) / 12; in magic_date_calc() 221 time->y = y; in magic_date_calc() 259 time->y += time->relative.y; in do_adjust_relative() 458 y -= time->m <= 2; in timelib_epoch_days_from_time() [all …]
|
H A D | unixtime2tm.c | 29 void timelib_unixtime2date(timelib_sll ts, timelib_sll *y, timelib_sll *m, timelib_sll *d) in timelib_unixtime2date() argument 46 *y = year_of_era + era * YEARS_PER_ERA; in timelib_unixtime2date() 51 *y += (*m <= 2); in timelib_unixtime2date() 53 TIMELIB_DEBUG(printf("A: ts=%lld, year=%lld, month=%lld, day=%lld,", ts, *y, *m, *d);); in timelib_unixtime2date() 62 timelib_unixtime2date(ts, &tm->y, &tm->m, &tm->d); in timelib_unixtime2gmt()
|
/php-src/ext/date/ |
H A D | php_date.c | 1196 now->y = yea; in php_mktime() 1239 zend_long m, d, y; in PHP_FUNCTION() local 1244 Z_PARAM_LONG(y) in PHP_FUNCTION() 1247 if (y < 1 || y > 32767 || !timelib_valid_date(y, m, d)) { in PHP_FUNCTION() 3279 dateobj->time->y = tmp_time->y; in php_date_modify() 3722 dateobj->time->y = y; in php_date_date_set() 3732 zend_long y, m, d; in PHP_FUNCTION() local 3748 zend_long y, m, d; in PHP_METHOD() local 3768 dateobj->time->y = y; in php_date_isodate_set() 3782 zend_long y, w, d = 1; in PHP_FUNCTION() local [all …]
|
/php-src/ext/date/tests/ |
H A D | 009.phpt | 14 …C %d %D %e %g %G %h %H %I %j %m %M %n %p %r %R %S %t %T %u %U %V %W %w %x %X %y %Y %Z %z %%", $t)); 19 …C %d %D %e %g %G %h %H %I %j %m %M %n %p %r %R %S %t %T %u %U %V %W %w %x %X %y %Y %Z %z %%", $t));
|
H A D | 009_win32.phpt | 19 var_dump(strftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t)); 27 var_dump(gmstrftime("%a %A %b %B %c %d %H %I %j %m %M %p %S %U %W %w %x %X %y %Y %Z %z %%", $t));
|
H A D | DateInterval_format.phpt | 26 echo $interval->format('y=%y') . "\n"; 57 y=1
|
H A D | DateInterval_serialize-001.phpt | 30 ["y"]=> 54 string(164) "O:12:"DateInterval":10:{s:1:"y";i:2;s:1:"m";i:0;s:1:"d";i:4;s:1:"h";i:6;s:1:"i";i:8;s:… 59 ["y"]=> 84 ["y"]=>
|
H A D | DateInterval_serialize-002.phpt | 29 'y' => 43, 49 ["y"]=> 73 string(172) "O:12:"DateInterval":10:{s:1:"y";i:43;s:1:"m";i:3;s:1:"d";i:24;s:1:"h";i:1;s:1:"i";i:12… 78 ["y"]=> 103 ["y"]=> 128 ["y"]=>
|
H A D | DatePeriod_createFromISO8601String_static_return.phpt | 40 ["y"]=>
|
H A D | DatePeriod_getter.phpt | 19 var_dump($period->getDateInterval()->format('%R%y-%m-%d-%h-%i-%s'));
|
H A D | DatePeriod_serialize-001.phpt | 41 ["y"]=> 72 …0";}s:7:"current";N;s:3:"end";N;s:8:"interval";O:12:"DateInterval":10:{s:1:"y";i:0;s:1:"m";i:0;s:1… 92 ["y"]=> 139 ["y"]=>
|
H A D | DatePeriod_serialize-002.phpt | 56 ["y"]=> 87 …timezone";s:13:"Europe/London";}s:8:"interval";O:12:"DateInterval":10:{s:1:"y";i:2;s:1:"m";i:6;s:1… 114 ["y"]=> 168 ["y"]=>
|
H A D | DatePeriod_serialize-003.phpt | 56 ["y"]=> 87 …timezone";s:13:"Europe/London";}s:8:"interval";O:12:"DateInterval":10:{s:1:"y";i:2;s:1:"m";i:6;s:1… 114 ["y"]=> 168 ["y"]=>
|