Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
add displayUTC() as a shortcut to display(Timestamp.utc())
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Jan 1, 2018
1 parent b304a15 commit 5130f9d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/util/Timestamp.js
Expand Up @@ -67,6 +67,16 @@ class Timestamp {
return Timestamp._display(this._template, time);
}

/**
* Display the current date utc with the current pattern.
* @since 0.5.0
* @param {(Date|number|string)} [time=new Date()] The time to display in utc
* @returns {string}
*/
displayUTC(time = new Date()) {
return Timestamp._display(this._template, Timestamp.utc(time));
}

/**
* Edits the current pattern.
* @since 0.5.0
Expand Down

0 comments on commit 5130f9d

Please sign in to comment.