MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / localeEras

Function localeEras

tests/test_code/js/moment/moment.js:4323–4349  ·  view source on GitHub ↗
(m, format)

Source from the content-addressed store, hash-verified

4321 });
4322
4323 function localeEras(m, format) {
4324 var i,
4325 l,
4326 date,
4327 eras = this._eras || getLocale('en')._eras;
4328 for (i = 0, l = eras.length; i < l; ++i) {
4329 switch (typeof eras[i].since) {
4330 case 'string':
4331 // truncate time
4332 date = hooks(eras[i].since).startOf('day');
4333 eras[i].since = date.valueOf();
4334 break;
4335 }
4336
4337 switch (typeof eras[i].until) {
4338 case 'undefined':
4339 eras[i].until = +Infinity;
4340 break;
4341 case 'string':
4342 // truncate time
4343 date = hooks(eras[i].until).startOf('day').valueOf();
4344 eras[i].until = date.valueOf();
4345 break;
4346 }
4347 }
4348 return eras;
4349 }
4350
4351 function localeErasParse(eraName, format, strict) {
4352 var i,

Callers

nothing calls this directly

Calls 2

getLocaleFunction · 0.85
hooksFunction · 0.85

Tested by

no test coverage detected