From 6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 13 Jul 2018 19:06:45 +0200 Subject: Fixed many permissions and began admin interface --- .../moment/src/lib/units/timestamp.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 public/bower_components/moment/src/lib/units/timestamp.js (limited to 'public/bower_components/moment/src/lib/units/timestamp.js') diff --git a/public/bower_components/moment/src/lib/units/timestamp.js b/public/bower_components/moment/src/lib/units/timestamp.js new file mode 100644 index 0000000..a49e1e4 --- /dev/null +++ b/public/bower_components/moment/src/lib/units/timestamp.js @@ -0,0 +1,20 @@ +import { addFormatToken } from '../format/format'; +import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex'; +import { addParseToken } from '../parse/token'; +import toInt from '../utils/to-int'; + +// FORMATTING + +addFormatToken('X', 0, 0, 'unix'); +addFormatToken('x', 0, 0, 'valueOf'); + +// PARSING + +addRegexToken('x', matchSigned); +addRegexToken('X', matchTimestamp); +addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); +}); +addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); +}); -- cgit v1.2.3