Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 9bcbca8

Browse files
krolikowskidamianlukaszMycs
authored andcommitted
Chore: Update format module (#16)
* Update format module * Update format.js
1 parent 7c91088 commit 9bcbca8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

N/format.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
const moment = require('moment');
1010

1111
module.exports = {
12-
format: options => moment(options.value).format('D.M.YYYY H:m'),
13-
parse: options => moment(options.value).format('D.M.YYYY H:m'),
12+
format: options => moment(options.value).format(options.format || 'D.M.YYYY H:m'),
13+
parse: options => moment(options.value, options.format || 'D.M.YYYY H:m').toDate(),
1414
Type: {
1515
DATETIME: 'DATETIME',
1616
DATETIMEZ: 'DATETIMEZ',

0 commit comments

Comments
 (0)