diff options
Diffstat (limited to 'date-fns/examples/flow/example.js.flow')
-rw-r--r-- | date-fns/examples/flow/example.js.flow | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/date-fns/examples/flow/example.js.flow b/date-fns/examples/flow/example.js.flow new file mode 100644 index 0000000..3b06f0a --- /dev/null +++ b/date-fns/examples/flow/example.js.flow @@ -0,0 +1,8 @@ +// @flow + +const format = require('date-fns/format') + +const dateString : Date = new Date(2017, 0, 25, 21, 28, 15) +const formatString : string = 'dd.MM.yyyy HH:mm:ss' +const result : string = format(dateString, formatString) +console.log(result === '25.01.2017 21:28:15') |