-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f75199
commit 6c52afa
Showing
11 changed files
with
426 additions
and
3,204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
/** Convert a date/time to a nice Date object. | ||
Example: 2014-08-21 14:38:00 UTC -> [Date object] */ | ||
function convert_date_time(date) { | ||
var arr_date = date.split(/[ T]/); | ||
var iso_date = arr_date[0] + " " + arr_date[1] + arr_date[2]; | ||
return moment(iso_date); | ||
} | ||
|
||
/** Localize the date with a specified locale format string. */ | ||
function localize_date(actual_date_div, date_div, format) { | ||
if (actual_date_div.value !== "") { | ||
var date = moment(actual_date_div.value); | ||
date_div.value = date.format(format); | ||
} | ||
} | ||
|
||
/** Localize the date/time with a specified locale format string. */ | ||
function localize_datetime(actual_date_div, date_div, format) { | ||
if (actual_date_div.value.indexOf(" ") > -1) { | ||
var date = convert_date_time($(actual_date_div).attr("value")); | ||
date_div.value = date.format(format); | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<%= javascript_tag nonce: true do %> | ||
if (I18n) { | ||
I18n.locale = '<%= I18n.locale %>'; | ||
moment.locale(I18n.locale); | ||
dayjs.locale(I18n.locale); | ||
} | ||
<% end %> |
Oops, something went wrong.