Skip to content

Instantly share code, notes, and snippets.

@JamoCA JamoCA/test-dates.cfm

Last active Jun 30, 2020
Embed
What would you like to do?
Test date strings for ColdFusion isDate() and date parsing functions.
<cfscript>
/* Test date strings for ColdFusion isDate() and date parsing functions. (20200630)
Using RSS Dates from http://rssdateformats.tumblr.com/ and
https://github.com/mjibson/goread/blob/0387db10bd9fd9ccd90d557fa30b6e494efa577a/goapp/utils.go#L129
*/
dates = ["now",
"12/31/292278993",
DateAdd("d", 1, "12/31/292278993"),
2000,
"1/1/22019",
"01-02-2006",
"01.02.06",
"01/02/2006",
"02 Jan 2006 15:04:05 -0700",
"02 Jan 2006 15:04:05 MST",
"02 Jan 2006 15:04:05 UT",
"02 Jan 2006",
"1/2/2006 3:04:05 PM",
"2 Jan 2006 15:04:05 MST",
"2 January 2006",
"2006-01-02 15:04",
"2006-01-02 15:04:05 -0700",
"2006-01-02 15:04:05 MST",
"2006-01-02",
"2006-01-02T15:04-07:00",
"2006-01-02T15:04:05 -0700",
"2006-01-02T15:04:05",
"2006-01-02T15:04:05-0700",
"2006-01-02T15:04:05-07:00",
"2006-01-02T15:04:05-07:00:00",
"2006-01-02T15:04:05Z",
"2006-1-2 15:04:05",
"2006-1-2",
"Jan 2, 2006 15:04:05 MST",
"Jan 2, 2006 3:04:05 PM MST",
"January 02, 2006 15:04:05 MST",
"January 2, 2006 15:04:05 MST",
"Mon, 02 Jan 06 15:04:05 MST",
"Mon, 02 Jan 2006 15:04 MST",
"Mon, 02 Jan 2006 15:04:05 -0700",
"Mon, 02 Jan 2006 15:04:05 -07:00",
"Mon, 02 Jan 2006 15:04:05 MST",
"Mon, 02 Jan 2006 15:04:05 UT",
"Mon, 02 Jan 2006 15:04:05 Z",
"Mon, 02 Jan 2006 15:04:05",
"Mon, 02 Jan 2006 15:04:05MST",
"Mon, 02 Jan 2006 3:04:05 PM MST",
"Mon, 02 Jan 2006",
"Mon, 02 January 2006",
"Mon, 2 Jan 06 15:04:05 -0700",
"Mon, 2 Jan 2006 15:04:05 -0700",
"Mon, 2 Jan 2006 15:04:05 MST",
"Mon, 2 Jan 2006 15:04:05 UT",
"Mon, 2 Jan 2006",
"Mon, 2 Jan 2006, 15:04 -0700",
"Mon, 2 January 2006 15:04:05 -0700",
"Mon, 2 January 2006 15:04:05 MST",
"Mon, 2 January 2006, 15:04 -0700",
"Mon, 2 January 2006, 15:04:05 MST",
"Mon, Jan 2 2006 15:04:05 -0700",
"Mon, Jan 2 2006 15:04:05 -700",
"Mon, January 2 2006 15:04:05 -0700",
"Monday, 02 January 2006 15:04:05 -0700",
"Monday, 02 January 2006 15:04:05 MST",
"Monday, 2 Jan 2006 15:04:05 -0700",
"Monday, 2 Jan 2006 15:04:05 MST",
"Monday, 2 January 2006 15:04:05 -0700",
"Monday, January 02, 2006"
];
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.