Permalink
Browse files

Switched date parsing to momentjs

  • Loading branch information...
h9k committed Feb 4, 2018
1 parent 919681c commit d449618b5aa252cba733b33d709df63825e71f43
View
@@ -1,6 +1,6 @@
{
"name": "magirc",
"homepage": "http://www.magirc.org/",
"homepage": "https://www.magirc.org/",
"description": "MagIRC",
"main": "js/magirc.js",
"keywords": [
@@ -21,15 +21,16 @@
"tests"
],
"dependencies": {
"datatables.net-jqui": "^1.10.12",
"datatables.net": "^1.10.12",
"jquery-ui": "^1.12.0",
"jquery": "^3.1.0",
"js-cookie": "^2.1.3",
"highcharts": "^4.2.6",
"jquery-form": "^3.46.0",
"jquery-dateFormat": "^1.0.2",
"requirejs": "^2.3.1",
"flag-icon-css": "^2.4.0"
"jquery": "^3.3.1",
"jquery-ui": "^1.12.1",
"bootstrap": "^4.0.0",
"datatables.net": "^1.10.16",
"datatables.net-jqui": "^1.10.16",
"datatables.net-bs": "^1.10.16",
"js-cookie": "^2.2.0",
"highcharts": "^6.0.5",
"jquery-form": "^4.2.2",
"requirejs": "^2.3.5",
"flag-icon-css": "^2.9.0"
}
}
View
@@ -1,18 +1,16 @@
$(document).ready(function() {
$.format.date.defaultShortDateFormat = "dd/MM/yyyy";
$.format.date.defaultLongDateFormat = "dd/MM/yyyy hh:mm:ss";
$(".shortDateFormat").each(function (idx, elem) {
if ($(elem).is(":input")) {
$(elem).val($.format.date($(elem).val(), $.format.date.defaultShortDateFormat));
$(elem).val(moment($(elem).val()).format('L'));
} else {
$(elem).text($.format.date($(elem).text(), $.format.date.defaultShortDateFormat));
$(elem).text(moment($(elem).text()).format('L'));
}
});
$(".longDateFormat").each(function (idx, elem) {
if ($(elem).is(":input")) {
$(elem).val($.format.date($(elem).val(), $.format.date.defaultLongDateFormat));
$(elem).val(moment($(elem).val()).format('lll'));
} else {
$(elem).text($.format.date($(elem).text(), $.format.date.defaultLongDateFormat));
$(elem).text(moment($(elem).text()).format('lll'));
}
});
$.extend($.fn.dataTable.defaults, {
View
@@ -0,0 +1,21 @@
require.config({
shim: {
},
paths: {
"datatables.net": "../bower_components/datatables.net/js/jquery.dataTables",
"datatables.net-jqui": "../bower_components/datatables.net-jqui/js/dataTables.jqueryui",
highcharts: "../bower_components/highcharts/highcharts",
"highcharts-more": "../bower_components/highcharts/highcharts-more",
exporting: "../bower_components/highcharts/modules/exporting",
jquery: "../bower_components/jquery/dist/jquery",
"jquery-dateFormat": "../bower_components/jquery-dateFormat/dist/jquery-dateFormat",
"jquery-form": "../bower_components/jquery-form/jquery.form",
"jquery-ui": "../bower_components/jquery-ui/jquery-ui",
"js-cookie": "../bower_components/js-cookie/src/js.cookie",
"magirc": "magirc"
},
packages: [
]
});
Binary file not shown.
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: MagIRC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-31 10:23+0100\n"
"PO-Revision-Date: 2015-01-31 10:25+0100\n"
"PO-Revision-Date: 2018-02-04 13:29+0100\n"
"Last-Translator: Hal9000 <hal9000@magirc.org>\n"
"Language-Team: \n"
"Language: de_DE\n"
@@ -13,21 +13,21 @@ msgstr ""
"X-Poedit-KeywordsList: _;gettext;gettext_noop;T_gettext\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 1.7.4\n"
"X-Generator: Poedit 2.0.6\n"
"X-Poedit-SearchPath-0: ../..\n"
"X-Poedit-SearchPath-1: ../../../lib/magirc\n"
#: ../../strings.c:2
msgid "Channel activity for %1"
msgstr "Raum-Aktivität für %1"
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548
#: ../../strings.c:599 ../../strings.c:824
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548 ../../strings.c:599
#: ../../strings.c:824
msgid "Total"
msgstr "Gesamt"
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551
#: ../../strings.c:602 ../../strings.c:827
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551 ../../strings.c:602
#: ../../strings.c:827
msgid "Today"
msgstr "Heute"
@@ -87,12 +87,12 @@ msgstr "Modes"
msgid "Topics"
msgstr "Topics"
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68
#: ../../strings.c:113 ../../strings.c:134 ../../strings.c:215
#: ../../strings.c:230 ../../strings.c:242 ../../strings.c:323
#: ../../strings.c:395 ../../strings.c:404 ../../strings.c:413
#: ../../strings.c:425 ../../strings.c:437 ../../strings.c:521
#: ../../strings.c:593 ../../strings.c:638 ../../strings.c:707
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68 ../../strings.c:113
#: ../../strings.c:134 ../../strings.c:215 ../../strings.c:230
#: ../../strings.c:242 ../../strings.c:323 ../../strings.c:395
#: ../../strings.c:404 ../../strings.c:413 ../../strings.c:425
#: ../../strings.c:437 ../../strings.c:521 ../../strings.c:593
#: ../../strings.c:638 ../../strings.c:707
msgid "Loading"
msgstr "Laden"
@@ -471,8 +471,8 @@ msgid "Language"
msgstr "Sprache"
#: ../../strings.c:731
msgid "yyyy-MM-dd HH:mm:ss"
msgstr "dd.MM.yyyy HH:mm:ss"
msgid "YYYY-MM-DD hh:mm:ss"
msgstr "DD.MM.YYYY hh:mm:ss"
#: ../../strings.c:734
msgid "%Y-%m-%d %H:%M:%S"
Binary file not shown.
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: MagIRC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-31 10:22+0100\n"
"PO-Revision-Date: 2015-01-31 10:22+0100\n"
"PO-Revision-Date: 2018-02-04 13:29+0100\n"
"Last-Translator: Hal9000 <hal9000@magirc.org>\n"
"Language-Team: \n"
"Language: en_US\n"
@@ -13,21 +13,21 @@ msgstr ""
"X-Poedit-KeywordsList: _;gettext;gettext_noop;T_gettext\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 1.7.4\n"
"X-Generator: Poedit 2.0.6\n"
"X-Poedit-SearchPath-0: ../..\n"
"X-Poedit-SearchPath-1: ../../../lib/magirc\n"
#: ../../strings.c:2
msgid "Channel activity for %1"
msgstr ""
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548
#: ../../strings.c:599 ../../strings.c:824
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548 ../../strings.c:599
#: ../../strings.c:824
msgid "Total"
msgstr ""
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551
#: ../../strings.c:602 ../../strings.c:827
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551 ../../strings.c:602
#: ../../strings.c:827
msgid "Today"
msgstr ""
@@ -87,12 +87,12 @@ msgstr ""
msgid "Topics"
msgstr ""
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68
#: ../../strings.c:113 ../../strings.c:134 ../../strings.c:215
#: ../../strings.c:230 ../../strings.c:242 ../../strings.c:323
#: ../../strings.c:395 ../../strings.c:404 ../../strings.c:413
#: ../../strings.c:425 ../../strings.c:437 ../../strings.c:521
#: ../../strings.c:593 ../../strings.c:638 ../../strings.c:707
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68 ../../strings.c:113
#: ../../strings.c:134 ../../strings.c:215 ../../strings.c:230
#: ../../strings.c:242 ../../strings.c:323 ../../strings.c:395
#: ../../strings.c:404 ../../strings.c:413 ../../strings.c:425
#: ../../strings.c:437 ../../strings.c:521 ../../strings.c:593
#: ../../strings.c:638 ../../strings.c:707
msgid "Loading"
msgstr ""
@@ -471,7 +471,7 @@ msgid "Language"
msgstr ""
#: ../../strings.c:731
msgid "yyyy-MM-dd HH:mm:ss"
msgid "YYYY-MM-DD hh:mm:ss"
msgstr ""
#: ../../strings.c:734
Binary file not shown.
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: MagIRC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-31 10:25+0100\n"
"PO-Revision-Date: 2015-01-31 10:27+0100\n"
"PO-Revision-Date: 2018-02-04 13:30+0100\n"
"Last-Translator: Hal9000 <hal9000@magirc.org>\n"
"Language-Team: \n"
"Language: es_ES\n"
@@ -13,21 +13,21 @@ msgstr ""
"X-Poedit-KeywordsList: _;gettext;gettext_noop;T_gettext\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 1.7.4\n"
"X-Generator: Poedit 2.0.6\n"
"X-Poedit-SearchPath-0: ../..\n"
"X-Poedit-SearchPath-1: ../../../lib/magirc\n"
#: ../../strings.c:2
msgid "Channel activity for %1"
msgstr "Actividad del canal %1"
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548
#: ../../strings.c:599 ../../strings.c:824
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548 ../../strings.c:599
#: ../../strings.c:824
msgid "Total"
msgstr "Total"
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551
#: ../../strings.c:602 ../../strings.c:827
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551 ../../strings.c:602
#: ../../strings.c:827
msgid "Today"
msgstr "Hoy"
@@ -87,12 +87,12 @@ msgstr "Modos"
msgid "Topics"
msgstr "Topics"
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68
#: ../../strings.c:113 ../../strings.c:134 ../../strings.c:215
#: ../../strings.c:230 ../../strings.c:242 ../../strings.c:323
#: ../../strings.c:395 ../../strings.c:404 ../../strings.c:413
#: ../../strings.c:425 ../../strings.c:437 ../../strings.c:521
#: ../../strings.c:593 ../../strings.c:638 ../../strings.c:707
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68 ../../strings.c:113
#: ../../strings.c:134 ../../strings.c:215 ../../strings.c:230
#: ../../strings.c:242 ../../strings.c:323 ../../strings.c:395
#: ../../strings.c:404 ../../strings.c:413 ../../strings.c:425
#: ../../strings.c:437 ../../strings.c:521 ../../strings.c:593
#: ../../strings.c:638 ../../strings.c:707
msgid "Loading"
msgstr "Cargando"
@@ -471,8 +471,8 @@ msgid "Language"
msgstr "Idioma"
#: ../../strings.c:731
msgid "yyyy-MM-dd HH:mm:ss"
msgstr "dd-MM-yyyy HH:mm:ss"
msgid "YYYY-MM-DD hh:mm:ss"
msgstr "DD-MM-YYYY hh:mm:ss"
#: ../../strings.c:734
msgid "%Y-%m-%d %H:%M:%S"
Binary file not shown.
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: MagIRC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-31 10:27+0100\n"
"PO-Revision-Date: 2015-01-31 10:29+0100\n"
"PO-Revision-Date: 2018-02-04 13:30+0100\n"
"Last-Translator: Hal9000 <hal9000@magirc.org>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -13,21 +13,21 @@ msgstr ""
"X-Poedit-KeywordsList: _;gettext;gettext_noop;T_gettext\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 1.7.4\n"
"X-Generator: Poedit 2.0.6\n"
"X-Poedit-SearchPath-0: ../..\n"
"X-Poedit-SearchPath-1: ../../../lib/magirc\n"
#: ../../strings.c:2
msgid "Channel activity for %1"
msgstr "Activité canal pour %1"
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548
#: ../../strings.c:599 ../../strings.c:824
#: ../../strings.c:5 ../../strings.c:74 ../../strings.c:548 ../../strings.c:599
#: ../../strings.c:824
msgid "Total"
msgstr "Total"
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551
#: ../../strings.c:602 ../../strings.c:827
#: ../../strings.c:8 ../../strings.c:77 ../../strings.c:551 ../../strings.c:602
#: ../../strings.c:827
msgid "Today"
msgstr "Aujourd'hui"
@@ -87,12 +87,12 @@ msgstr "Modes"
msgid "Topics"
msgstr "Sujets"
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68
#: ../../strings.c:113 ../../strings.c:134 ../../strings.c:215
#: ../../strings.c:230 ../../strings.c:242 ../../strings.c:323
#: ../../strings.c:395 ../../strings.c:404 ../../strings.c:413
#: ../../strings.c:425 ../../strings.c:437 ../../strings.c:521
#: ../../strings.c:593 ../../strings.c:638 ../../strings.c:707
#: ../../strings.c:44 ../../strings.c:56 ../../strings.c:68 ../../strings.c:113
#: ../../strings.c:134 ../../strings.c:215 ../../strings.c:230
#: ../../strings.c:242 ../../strings.c:323 ../../strings.c:395
#: ../../strings.c:404 ../../strings.c:413 ../../strings.c:425
#: ../../strings.c:437 ../../strings.c:521 ../../strings.c:593
#: ../../strings.c:638 ../../strings.c:707
msgid "Loading"
msgstr "Chargement"
@@ -471,8 +471,8 @@ msgid "Language"
msgstr "Langage"
#: ../../strings.c:731
msgid "yyyy-MM-dd HH:mm:ss"
msgstr "dd/MM/yyyy HH:mm:ss"
msgid "YYYY-MM-DD hh:mm:ss"
msgstr "DD/MM/YYYY hh:mm:ss"
#: ../../strings.c:734
msgid "%Y-%m-%d %H:%M:%S"
Binary file not shown.
Oops, something went wrong.

0 comments on commit d449618

Please sign in to comment.