PHP Classes

File: vendors/gentelella/vendors/moment/src/lib/moment/to-type.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/gentelella/vendors/moment/src/lib/moment/to-type.js   Download  
File: vendors/gentelella/vendors/moment/src/lib/moment/to-type.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 803 bytes
 

Contents

Class file image Download
export function valueOf () { return this._d.valueOf() - ((this._offset || 0) * 60000); } export function unix () { return Math.floor(this.valueOf() / 1000); } export function toDate () { return this._offset ? new Date(this.valueOf()) : this._d; } export function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } export function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } export function toJSON () { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; }