Opened 12 years ago

Last modified 7 years ago

#6008 closed enhancement

dojo.date.get() detect any kind of date (string, object, etc) — at Version 3

Reported by: wolfram Owned by: Adam Peller
Priority: low Milestone: future
Component: Dojox Version: 1.0
Keywords: needsreview Cc: Neil Roberts
Blocked By: Blocking:

Description (last modified by wolfram)

I was missing a general functionality to detect any kind of date and properly convert it, so I wrote quite a simple first version of it. Interesting for dojo?

    // Return a Date object for the various inputs
    dojo.date.get(new Date());
    dojo.date.get("2009-11-11 11:12:13")
    dojo.date.get("now");
    dojo.date.get("yesterday");
    dojo.date.get("3 days ago");
    dojo.date.get("3 weeks ago");

and I am sure that a lot of things could be interesting to be done, like "+3 days", "-1 week", etc.

Change History (4)

comment:1 Changed 12 years ago by wolfram

Type: defectenhancement

Changed 12 years ago by wolfram

Attachment: date_get.patch added

comment:2 Changed 12 years ago by wolfram

Description: modified (diff)

comment:3 Changed 12 years ago by wolfram

Description: modified (diff)
Note: See TracTickets for help on using tickets.