Epoch Converter

What's the Current Day Number?

... and day-of-the-year programming routines.
 

 Today March 10, 2010 is ...

 

Day 69


 
Day of year is a number between 1 and 366 (January 1 is day 1).

Some application use 'ISO day of year' numbers, this is a number between 1 and 371, day 1 of the year is Monday of the first ISO week (where the first Thursday of the new year is in week 1 ?).
 

 

 Current day of the year in ...

Perlmy $dayNumber = POSIX::strftime("%j", gmtime time); Replace time with other epochs for other days.
PHP$dayNumber = date("z") + 1; or date("z", epoch) + 1 for other day numbers. date("z") starts counting from 0 (0 through 365)!
Pythonday_of_year = datetime.now().timetuple().tm_yday
MySQLSELECT DAYOFYEAR(NOW()) Day number between 1 and 366. Replace now() with other dates eg. SELECT DAYOFYEAR('2008-02-20');
Microsoft AccessDatePart("y",Date)
JavaScriptSee this page


Also see: Current week number  
 
 
 
Return to the Epoch Converter homepage
© 2010 Misja.com - sitemap