MCPcopy Index your code
hub / github.com/ddopson/underscore-cli / ISO8601

Function ISO8601

lib/formatter.js:196–213  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

194}
195
196function ISO8601(d) {
197 function f2(n) {
198 // Format integers to have at least two digits.
199 return (n < 10) ? ('0' + n) : n;
200 }
201 function f3(n) {
202 // Format integers to have at least three digits.
203 return (n < 10) ? ('00' + n) : (n < 100) ? ('0' + n) : n;
204 }
205
206 return d.getUTCFullYear() + '-' +
207 f2(d.getUTCMonth() + 1) + '-' +
208 f2(d.getUTCDate()) + 'T' +
209 f2(d.getUTCHours()) + ':' +
210 f2(d.getUTCMinutes()) + ':' +
211 f2(d.getUTCSeconds()) + '.' +
212 f3(d.getMilliseconds()) + 'Z';
213}
214
215
216function joinCollection(ctx, entries, b1, b2, insideObject) {

Callers 1

formatValueFunction · 0.85

Calls 2

f2Function · 0.85
f3Function · 0.85

Tested by

no test coverage detected