Relative Content

Tag Archive for date-format

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 builtin variable?

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):

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.

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 was created a long time ago, and you’re not really sure about the exact date, but you know the year and month. Other records you know just the year. Other records you know the day, month and year.

Interpreting Date formats

Let’s say I have a DatePicker control and I allow my US clients to type something like
"1/1" in it and hit tab go to next control. So I will parse that date for them as “01/01/2014” and some more similar patterns. But they are all US-based so they are