How to use the isMoment function from moment

Find comprehensive JavaScript moment.isMoment code examples handpicked from public code repositorys.

14
15
16
17
18
19
20
21
22
23
make(): Moment {
  return moment(...arguments)
}

isMoment(value: any): boolean {
  return moment.isMoment(value)
}

setNow(cb: () => any): this {
  moment.now = cb
fork icon5
star icon28
watch icon4

48
49
50
51
52
53
54
55
56
57

if (datetime == null) { datetime = undefined; }
if (dtFormat == null) { dtFormat = 'YYYY-MM'; }

// If a Moment.js object was passed in, just call format on it
if (datetime && moment.isMoment(datetime)) {
  return datetime.format(dtFormat);
}

if (String.is(datetime)) {
fork icon543
star icon0
watch icon208