Correction of date manipulation functions

Since they lacked the return keyword, they weren't working properly.
Also included the unminified version of Datejs (en-US).
This commit is contained in:
Ricardo Henrique Gracini Guiraldelli 2015-08-30 13:24:19 +02:00
parent 30a474a004
commit 039ba7b05b
2 changed files with 1233 additions and 3 deletions

View File

@ -6,16 +6,16 @@ var DATE_ISO_FORMAT = "yyyy-MM-dd";
// given a date represented as string, returns the date as a Date Javascript
// object using the Datejs library
function get_date(string_date){
Date.parse(string_date);
return Date.parse(string_date);
}
// gets a mathced date from regex and converts to a string in the ISO format
// using the Datejs library
function get_iso_date(matched_date){
Date.parse(matched_date).toString(DATE_ISO_FORMAT);
return Date.parse(matched_date).toString(DATE_ISO_FORMAT);
}
// returns the matched date found in the line, otherwise null
// returns the matched date found in the line
function get_literal_date(line){
var match = line.match(REGEX_DATE);
if (match.length > 0){

1230
datejs.js Normal file

File diff suppressed because it is too large Load Diff