@bbn/bbn 2.0.75 → 2.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/dt/classes/dt.js +8 -5
- package/package.json +1 -1
package/dist/dt/classes/dt.js
CHANGED
|
@@ -331,19 +331,22 @@ export class bbnDt {
|
|
|
331
331
|
if (!('year' in this.value) || !('month' in this.value) || !('day' in this.value)) {
|
|
332
332
|
throw new Error('date() is not supported for this type');
|
|
333
333
|
}
|
|
334
|
-
|
|
334
|
+
if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
|
|
335
|
+
return this.parse(v, 'Y-m-d');
|
|
336
|
+
}
|
|
337
|
+
return this.YYYY + '-' + this.MM + '-' + this.DD;
|
|
335
338
|
}
|
|
336
339
|
datetime(v) {
|
|
337
340
|
if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
|
|
338
341
|
return this.parse(v, 'Y-m-d H:i:s');
|
|
339
342
|
}
|
|
340
|
-
return this.
|
|
343
|
+
return this.YYYY + '-' + this.MM + '-' + this.DD + ' ' + this.HH + ':' + this.II + ':' + this.SS;
|
|
341
344
|
}
|
|
342
345
|
time(v) {
|
|
343
346
|
if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
|
|
344
347
|
return this.parse(v, 'H:i:s');
|
|
345
348
|
}
|
|
346
|
-
return this.
|
|
349
|
+
return this.HH + ':' + this.II + ':' + this.SS;
|
|
347
350
|
}
|
|
348
351
|
week() {
|
|
349
352
|
if (!this.value) {
|
|
@@ -368,13 +371,13 @@ export class bbnDt {
|
|
|
368
371
|
}
|
|
369
372
|
get MMMM() {
|
|
370
373
|
if ('month' in this.value) {
|
|
371
|
-
return this.
|
|
374
|
+
return bbn.dt.locales.monthsLong[this.month() - 1];
|
|
372
375
|
}
|
|
373
376
|
return undefined;
|
|
374
377
|
}
|
|
375
378
|
get MMM() {
|
|
376
379
|
if ('month' in this.value) {
|
|
377
|
-
return this.
|
|
380
|
+
return bbn.dt.locales.monthsShort[this.month() - 1];
|
|
378
381
|
}
|
|
379
382
|
return undefined;
|
|
380
383
|
}
|