JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
CSS
p {
border-bottom: 1px solid #ddd;
font-family: monospace;
padding: 5px;
margin: 0;
line-height: 20px;
min-height: 20px;
white-space: pre;
}
JavaScript
function log () {
$('body').append('<p>' + [].join.call(arguments, ' '));
}
function test(m) {
log('');
log(m.format());
log(' is valid :', m.isValid());
log(' zone :', m.zone());
log(' in array :', m._a);
log('out array :', m.toArray());
}
log('moment version', moment.version);
test(moment.utc(0));
/* test(moment('01/01/1970', 'DD/MM/YYYY')); */
/* test(moment('01/01/1970 00:00:01', 'DD/MM/YYYY HH:mm:ss'));
test(moment('01/01/1970 00:59:59', 'DD/MM/YYYY HH:mm:ss'));
test(moment('01/01/1970 01:00:00', 'DD/MM/YYYY HH:mm:ss'));
test(moment('01/01/1970 01:00:01', 'DD/MM/YYYY HH:mm:ss'));
test(moment('31/12/1969 23:59:59', 'DD/MM/YYYY HH:mm:ss')); */