The date-format tag has no wiki summary.
84
votes
15answers
3k views
How do you store “fuzzy dates” into a database?
This is a problem I've run into a few times. Imagine you have a record that you want to store into a database table. This table has a DateTime column called "date_created". This one particular record ...
-1
votes
2answers
149 views
How to handle timezone for dates?
With a YYYY-MM-DD HH:MM:SS date I always store the UTC time. When I pull to display I translate timezones with built-in PHP functions and classes.
I believe that is one correct way to do it and it ...
30
votes
2answers
928 views
Why does Javascript treat days and months differently?
I've noticed that in JavaScript, when creating a Date, months are zero based, and days aren't.
For example:
var foo = new Date(2012, 1, 1)
produces February 1st 2012
Why is this?
3
votes
3answers
319 views
Date calculation algorithm
I'm working on a project to schedule a machine shop, basically I've got everything covered BUT date calculations, I've got a method called schedule (working on PHP here):
public function ...
0
votes
2answers
168 views
Ideal “intermediate” file format to use for structured/styled text?
I have files that I want to make available in an variety of formats:
HTML
PDF
EPUB
Plain Text (maybe)
Most of the files will be sourced in doc, docx, or rtf format, so that needs to be considered.
...
2
votes
2answers
425 views
Why did the ISO 8601 committee choose Monday as the first day of the week? [closed]
Sunday is considered the first day of the week in the United States and countries that followed the Greco-Roman tradition.
8
votes
6answers
1k views
Is there a constant for “end of time”?
For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a ...
4
votes
2answers
143 views
Which timezone is used for permalinks of posts
I wanted to add timezone support to my blog app but got stuck with a design problem.
Every post has a published_on field which stores the publication date in a timezone aware format (UTC converted to ...
0
votes
4answers
135 views
International two-part date formats
Do people outside of the USA use two-part date abbreviations for the current year? For instance, representing the last day of May, you might see someone enter 5/31 into a date field.
Do international ...
3
votes
3answers
2k views
Should I use the Date type in JAX-RS @PathParam?
This is what I'm thinking about doing on a JEE Glassfish server using Jersey.
@GET
@Path("/{name}/{date}")
public String getMessages(@PathParam("name") String name, @PathParam("date") Date date)
I ...
3
votes
3answers
268 views
Best representation for relative dates & durations
I use ISO 8601 to represent dates & durations and all is OK.
But now I need to represent relative dates and durations like:
The date for first day, at midnight, of the next week
All the last ...
27
votes
12answers
2k views
isn't number localization just unnecessary?
I've just read this page http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx
One of the things they did was to convert the arabic date to the arabic ...
6
votes
10answers
2k views
Is there a universal date format that anyone in the world can understand?
In Canada, everyone is familiar with the date format YYYY-MM-DD. In Europe or South Africa, they prefer DD-MM-YYYY. There are users from South Africa who get confused with the YYYY-MM-DD date ...