ngx-st-date-format 1.0.13 → 15.0.14
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/README.md +24 -24
- package/esm2020/lib/ngx-st-date-format.module.mjs +19 -31
- package/esm2020/lib/pipes/date-format.pipe.mjs +27 -27
- package/esm2020/lib/pipes/date-time-format.pipe.mjs +27 -27
- package/esm2020/lib/pipes/time-format.pipe.mjs +33 -33
- package/esm2020/ngx-st-date-format.mjs +4 -4
- package/esm2020/public-api.mjs +8 -8
- package/fesm2015/ngx-st-date-format.mjs +92 -104
- package/fesm2015/ngx-st-date-format.mjs.map +1 -1
- package/fesm2020/ngx-st-date-format.mjs +92 -104
- package/fesm2020/ngx-st-date-format.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/ngx-st-date-format.module.d.ts +9 -9
- package/lib/pipes/date-format.pipe.d.ts +8 -8
- package/lib/pipes/date-time-format.pipe.d.ts +8 -8
- package/lib/pipes/time-format.pipe.d.ts +8 -8
- package/package.json +3 -3
- package/public-api.d.ts +4 -4
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# NgxStDateFormat
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project ngx-st-date-format` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-st-date-format`.
|
|
8
|
-
> Note: Don't forget to add `--project ngx-st-date-format` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build ngx-st-date-format` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build ngx-st-date-format`, go to the dist folder `cd dist/ngx-st-date-format` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test ngx-st-date-format` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# NgxStDateFormat
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project ngx-st-date-format` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-st-date-format`.
|
|
8
|
+
> Note: Don't forget to add `--project ngx-st-date-format` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build ngx-st-date-format` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build ngx-st-date-format`, go to the dist folder `cd dist/ngx-st-date-format` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test ngx-st-date-format` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { DateFormatPipe } from
|
|
3
|
-
import { DateTimeFormatPipe } from
|
|
4
|
-
import { TimeFormatPipe } from
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
DateTimeFormatPipe,
|
|
21
|
-
TimeFormatPipe
|
|
22
|
-
],
|
|
23
|
-
imports: [],
|
|
24
|
-
exports: [
|
|
25
|
-
DateFormatPipe,
|
|
26
|
-
DateTimeFormatPipe,
|
|
27
|
-
TimeFormatPipe
|
|
28
|
-
]
|
|
29
|
-
}]
|
|
30
|
-
}] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LWRhdGUtZm9ybWF0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvbGliL25neC1zdC1kYXRlLWZvcm1hdC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDeEQsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sK0JBQStCLENBQUM7QUFDakUsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLDBCQUEwQixDQUFDOztBQWdCeEQsTUFBTSxPQUFPLHFCQUFxQjs7a0hBQXJCLHFCQUFxQjttSEFBckIscUJBQXFCLGlCQVo5QixjQUFjO1FBQ2Qsa0JBQWtCO1FBQ2xCLGNBQWMsYUFLZCxjQUFjO1FBQ2Qsa0JBQWtCO1FBQ2xCLGNBQWM7bUhBR0wscUJBQXFCOzJGQUFyQixxQkFBcUI7a0JBZGpDLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFO3dCQUNaLGNBQWM7d0JBQ2Qsa0JBQWtCO3dCQUNsQixjQUFjO3FCQUNmO29CQUNELE9BQU8sRUFBRSxFQUNSO29CQUNELE9BQU8sRUFBRTt3QkFDUCxjQUFjO3dCQUNkLGtCQUFrQjt3QkFDbEIsY0FBYztxQkFDZjtpQkFDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQge0RhdGVGb3JtYXRQaXBlfSBmcm9tIFwiLi9waXBlcy9kYXRlLWZvcm1hdC5waXBlXCI7XG5pbXBvcnQge0RhdGVUaW1lRm9ybWF0UGlwZX0gZnJvbSBcIi4vcGlwZXMvZGF0ZS10aW1lLWZvcm1hdC5waXBlXCI7XG5pbXBvcnQge1RpbWVGb3JtYXRQaXBlfSBmcm9tIFwiLi9waXBlcy90aW1lLWZvcm1hdC5waXBlXCI7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW1xuICAgIERhdGVGb3JtYXRQaXBlLFxuICAgIERhdGVUaW1lRm9ybWF0UGlwZSxcbiAgICBUaW1lRm9ybWF0UGlwZVxuICBdLFxuICBpbXBvcnRzOiBbXG4gIF0sXG4gIGV4cG9ydHM6IFtcbiAgICBEYXRlRm9ybWF0UGlwZSxcbiAgICBEYXRlVGltZUZvcm1hdFBpcGUsXG4gICAgVGltZUZvcm1hdFBpcGVcbiAgXVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hTdERhdGVGb3JtYXRNb2R1bGUgeyB9XG4iXX0=
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { DateFormatPipe } from './pipes/date-format.pipe';
|
|
3
|
+
import { DateTimeFormatPipe } from './pipes/date-time-format.pipe';
|
|
4
|
+
import { TimeFormatPipe } from './pipes/time-format.pipe';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class StDateFormatModule {
|
|
7
|
+
}
|
|
8
|
+
StDateFormatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
StDateFormatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] });
|
|
10
|
+
StDateFormatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
15
|
+
imports: [],
|
|
16
|
+
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LWRhdGUtZm9ybWF0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvbGliL25neC1zdC1kYXRlLWZvcm1hdC5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDMUQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDbkUsT0FBTyx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dGVGb3JtYXRNb2R1bGUge31cclxuIl19
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class DateFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleDateString();
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return new Date(value).toLocaleDateString();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
-
type: Pipe,
|
|
23
|
-
args: [{
|
|
24
|
-
name: 'stDateFormatPipe',
|
|
25
|
-
}]
|
|
26
|
-
}], ctorParameters: function () { return []; } });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DateFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleDateString();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return new Date(value).toLocaleDateString();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
20
|
+
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
22
|
+
type: Pipe,
|
|
23
|
+
args: [{
|
|
24
|
+
name: 'stDateFormatPipe',
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: function () { return []; } });
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1mb3JtYXQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvbGliL3BpcGVzL2RhdGUtZm9ybWF0LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7O0FBS2xELE1BQU0sT0FBTyxjQUFjO0lBQ3pCLGdCQUFlLENBQUM7SUFFaEIsU0FBUyxDQUFDLEtBQWdDO1FBQ3hDLElBQUksS0FBSyxFQUFFO1lBQ1QsSUFBSSxLQUFLLFlBQVksSUFBSSxFQUFFO2dCQUN6QixPQUFPLEtBQUssQ0FBQyxrQkFBa0IsRUFBRSxDQUFDO2FBQ25DO2lCQUNJO2dCQUNILE9BQU8sSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsa0JBQWtCLEVBQUUsQ0FBQzthQUM3QztTQUNGO2FBQ0k7WUFDSCxPQUFPLEVBQUUsQ0FBQztTQUNYO0lBQ0gsQ0FBQzs7NEdBZlUsY0FBYzswR0FBZCxjQUFjOzRGQUFkLGNBQWM7a0JBSDFCLElBQUk7bUJBQUM7b0JBQ0osSUFBSSxFQUFFLGtCQUFrQjtpQkFDekIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1BpcGUsIFBpcGVUcmFuc2Zvcm19IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XHJcblxyXG5AUGlwZSh7XHJcbiAgbmFtZTogJ3N0RGF0ZUZvcm1hdFBpcGUnLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgRGF0ZUZvcm1hdFBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICBjb25zdHJ1Y3RvcigpIHt9XHJcblxyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nIHwgRGF0ZSB8IHVuZGVmaW5lZCk6IHN0cmluZyB7XHJcbiAgICBpZiAodmFsdWUpIHtcclxuICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgRGF0ZSkge1xyXG4gICAgICAgIHJldHVybiB2YWx1ZS50b0xvY2FsZURhdGVTdHJpbmcoKTtcclxuICAgICAgfVxyXG4gICAgICBlbHNlIHtcclxuICAgICAgICByZXR1cm4gbmV3IERhdGUodmFsdWUpLnRvTG9jYWxlRGF0ZVN0cmluZygpO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICBlbHNlIHtcclxuICAgICAgcmV0dXJuICcnO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class DateTimeFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleString();
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return new Date(value).toLocaleString();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
-
type: Pipe,
|
|
23
|
-
args: [{
|
|
24
|
-
name: 'stDateTimeFormatPipe',
|
|
25
|
-
}]
|
|
26
|
-
}], ctorParameters: function () { return []; } });
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DateTimeFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleString();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return new Date(value).toLocaleString();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
20
|
+
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
22
|
+
type: Pipe,
|
|
23
|
+
args: [{
|
|
24
|
+
name: 'stDateTimeFormatPipe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XRlVGltZUZvcm1hdFBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICBjb25zdHJ1Y3RvcigpIHt9XHJcblxyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nIHwgRGF0ZSB8IHVuZGVmaW5lZCk6IHN0cmluZyB7XHJcbiAgICBpZiAodmFsdWUpIHtcclxuICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgRGF0ZSkge1xyXG4gICAgICAgIHJldHVybiB2YWx1ZS50b0xvY2FsZVN0cmluZygpO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBuZXcgRGF0ZSh2YWx1ZSkudG9Mb2NhbGVTdHJpbmcoKTtcclxuICAgICAgfVxyXG4gICAgfSBlbHNlIHtcclxuICAgICAgcmV0dXJuICcnO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Pipe } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class TimeFormatPipe {
|
|
4
|
-
constructor() { }
|
|
5
|
-
transform(value) {
|
|
6
|
-
if (value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return value.toLocaleTimeString([], {
|
|
9
|
-
hour: '2-digit',
|
|
10
|
-
minute: '2-digit',
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return new Date(value).toLocaleTimeString([], {
|
|
15
|
-
hour: '2-digit',
|
|
16
|
-
minute: '2-digit',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return '';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
-
type: Pipe,
|
|
29
|
-
args: [{
|
|
30
|
-
name: 'stTimeFormatPipe',
|
|
31
|
-
}]
|
|
32
|
-
}], ctorParameters: function () { return []; } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Pipe } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class TimeFormatPipe {
|
|
4
|
+
constructor() { }
|
|
5
|
+
transform(value) {
|
|
6
|
+
if (value) {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toLocaleTimeString([], {
|
|
9
|
+
hour: '2-digit',
|
|
10
|
+
minute: '2-digit',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return new Date(value).toLocaleTimeString([], {
|
|
15
|
+
hour: '2-digit',
|
|
16
|
+
minute: '2-digit',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
26
|
+
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
28
|
+
type: Pipe,
|
|
29
|
+
args: [{
|
|
30
|
+
name: 'stTimeFormatPipe',
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: function () { return []; } });
|
|
33
|
+
//# sourceMappingURL=data:application/json;base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iAgbmFtZTogJ3N0VGltZUZvcm1hdFBpcGUnLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgVGltZUZvcm1hdFBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICBjb25zdHJ1Y3RvcigpIHt9XHJcblxyXG4gIHRyYW5zZm9ybSh2YWx1ZTogc3RyaW5nIHwgRGF0ZSB8IHVuZGVmaW5lZCk6IHN0cmluZyB7XHJcbiAgICBpZiAodmFsdWUpIHtcclxuICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgRGF0ZSkge1xyXG4gICAgICAgIHJldHVybiB2YWx1ZS50b0xvY2FsZVRpbWVTdHJpbmcoW10sIHtcclxuICAgICAgICAgIGhvdXI6ICcyLWRpZ2l0JyxcclxuICAgICAgICAgIG1pbnV0ZTogJzItZGlnaXQnLFxyXG4gICAgICAgIH0pO1xyXG4gICAgICB9XHJcbiAgICAgIGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBuZXcgRGF0ZSh2YWx1ZSkudG9Mb2NhbGVUaW1lU3RyaW5nKFtdLCB7XHJcbiAgICAgICAgICBob3VyOiAnMi1kaWdpdCcsXHJcbiAgICAgICAgICBtaW51dGU6ICcyLWRpZ2l0JyxcclxuICAgICAgICB9KTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgZWxzZSB7XHJcbiAgICAgIHJldHVybiAnJztcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LWRhdGUtZm9ybWF0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbmd4LXN0LWRhdGUtZm9ybWF0L3NyYy9uZ3gtc3QtZGF0ZS1mb3JtYXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
package/esm2020/public-api.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of ngx-st-date-format
|
|
3
|
-
*/
|
|
4
|
-
export * from './lib/pipes/date-format.pipe';
|
|
5
|
-
export * from './lib/pipes/date-time-format.pipe';
|
|
6
|
-
export * from './lib/pipes/time-format.pipe';
|
|
7
|
-
export * from './lib/ngx-st-date-format.module';
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of ngx-st-date-format
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/pipes/date-format.pipe';
|
|
5
|
+
export * from './lib/pipes/date-time-format.pipe';
|
|
6
|
+
export * from './lib/pipes/time-format.pipe';
|
|
7
|
+
export * from './lib/ngx-st-date-format.module';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1kYXRlLWZvcm1hdC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxtQ0FBbUMsQ0FBQztBQUNsRCxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LXN0LWRhdGUtZm9ybWF0XHJcbiAqL1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMvZGF0ZS1mb3JtYXQucGlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL2RhdGUtdGltZS1mb3JtYXQucGlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL3BpcGVzL3RpbWUtZm9ybWF0LnBpcGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtc3QtZGF0ZS1mb3JtYXQubW9kdWxlJztcclxuIl19
|
|
@@ -1,120 +1,108 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
class DateFormatPipe {
|
|
5
|
-
constructor() { }
|
|
6
|
-
transform(value) {
|
|
7
|
-
if (value) {
|
|
8
|
-
if (value instanceof Date) {
|
|
9
|
-
return value.toLocaleDateString();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return new Date(value).toLocaleDateString();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
-
type: Pipe,
|
|
24
|
-
args: [{
|
|
25
|
-
name: 'stDateFormatPipe',
|
|
26
|
-
}]
|
|
4
|
+
class DateFormatPipe {
|
|
5
|
+
constructor() { }
|
|
6
|
+
transform(value) {
|
|
7
|
+
if (value) {
|
|
8
|
+
if (value instanceof Date) {
|
|
9
|
+
return value.toLocaleDateString();
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return new Date(value).toLocaleDateString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
21
|
+
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
23
|
+
type: Pipe,
|
|
24
|
+
args: [{
|
|
25
|
+
name: 'stDateFormatPipe',
|
|
26
|
+
}]
|
|
27
27
|
}], ctorParameters: function () { return []; } });
|
|
28
28
|
|
|
29
|
-
class DateTimeFormatPipe {
|
|
30
|
-
constructor() { }
|
|
31
|
-
transform(value) {
|
|
32
|
-
if (value) {
|
|
33
|
-
if (value instanceof Date) {
|
|
34
|
-
return value.toLocaleString();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return new Date(value).toLocaleString();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
-
type: Pipe,
|
|
49
|
-
args: [{
|
|
50
|
-
name: 'stDateTimeFormatPipe',
|
|
51
|
-
}]
|
|
29
|
+
class DateTimeFormatPipe {
|
|
30
|
+
constructor() { }
|
|
31
|
+
transform(value) {
|
|
32
|
+
if (value) {
|
|
33
|
+
if (value instanceof Date) {
|
|
34
|
+
return value.toLocaleString();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return new Date(value).toLocaleString();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
46
|
+
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
48
|
+
type: Pipe,
|
|
49
|
+
args: [{
|
|
50
|
+
name: 'stDateTimeFormatPipe',
|
|
51
|
+
}]
|
|
52
52
|
}], ctorParameters: function () { return []; } });
|
|
53
53
|
|
|
54
|
-
class TimeFormatPipe {
|
|
55
|
-
constructor() { }
|
|
56
|
-
transform(value) {
|
|
57
|
-
if (value) {
|
|
58
|
-
if (value instanceof Date) {
|
|
59
|
-
return value.toLocaleTimeString([], {
|
|
60
|
-
hour: '2-digit',
|
|
61
|
-
minute: '2-digit',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return new Date(value).toLocaleTimeString([], {
|
|
66
|
-
hour: '2-digit',
|
|
67
|
-
minute: '2-digit',
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
-
type: Pipe,
|
|
80
|
-
args: [{
|
|
81
|
-
name: 'stTimeFormatPipe',
|
|
82
|
-
}]
|
|
54
|
+
class TimeFormatPipe {
|
|
55
|
+
constructor() { }
|
|
56
|
+
transform(value) {
|
|
57
|
+
if (value) {
|
|
58
|
+
if (value instanceof Date) {
|
|
59
|
+
return value.toLocaleTimeString([], {
|
|
60
|
+
hour: '2-digit',
|
|
61
|
+
minute: '2-digit',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return new Date(value).toLocaleTimeString([], {
|
|
66
|
+
hour: '2-digit',
|
|
67
|
+
minute: '2-digit',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
77
|
+
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
79
|
+
type: Pipe,
|
|
80
|
+
args: [{
|
|
81
|
+
name: 'stTimeFormatPipe',
|
|
82
|
+
}]
|
|
83
83
|
}], ctorParameters: function () { return []; } });
|
|
84
84
|
|
|
85
|
-
class
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
declarations: [
|
|
98
|
-
DateFormatPipe,
|
|
99
|
-
DateTimeFormatPipe,
|
|
100
|
-
TimeFormatPipe
|
|
101
|
-
],
|
|
102
|
-
imports: [],
|
|
103
|
-
exports: [
|
|
104
|
-
DateFormatPipe,
|
|
105
|
-
DateTimeFormatPipe,
|
|
106
|
-
TimeFormatPipe
|
|
107
|
-
]
|
|
108
|
-
}]
|
|
85
|
+
class StDateFormatModule {
|
|
86
|
+
}
|
|
87
|
+
StDateFormatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
StDateFormatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] });
|
|
89
|
+
StDateFormatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
91
|
+
type: NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
94
|
+
imports: [],
|
|
95
|
+
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
96
|
+
}]
|
|
109
97
|
}] });
|
|
110
98
|
|
|
111
|
-
/*
|
|
112
|
-
* Public API Surface of ngx-st-date-format
|
|
99
|
+
/*
|
|
100
|
+
* Public API Surface of ngx-st-date-format
|
|
113
101
|
*/
|
|
114
102
|
|
|
115
|
-
/**
|
|
116
|
-
* Generated bundle index. Do not edit.
|
|
103
|
+
/**
|
|
104
|
+
* Generated bundle index. Do not edit.
|
|
117
105
|
*/
|
|
118
106
|
|
|
119
|
-
export { DateFormatPipe, DateTimeFormatPipe,
|
|
107
|
+
export { DateFormatPipe, DateTimeFormatPipe, StDateFormatModule, TimeFormatPipe };
|
|
120
108
|
//# sourceMappingURL=ngx-st-date-format.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stDateFormatPipe',\n})\nexport class DateFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleDateString();\n }\n else {\n return new Date(value).toLocaleDateString();\n }\n }\n else {\n return '';\n }\n }\n}\n","import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stDateTimeFormatPipe',\n})\nexport class DateTimeFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleString();\n } else {\n return new Date(value).toLocaleString();\n }\n } else {\n return '';\n }\n }\n}\n","import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stTimeFormatPipe',\n})\nexport class TimeFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n }\n else {\n return new Date(value).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n }\n }\n else {\n return '';\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport {DateFormatPipe} from
|
|
1
|
+
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateFormatPipe',\r\n})\r\nexport class DateFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n else {\r\n return new Date(value).toLocaleDateString();\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateTimeFormatPipe',\r\n})\r\nexport class DateTimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleString();\r\n } else {\r\n return new Date(value).toLocaleString();\r\n }\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stTimeFormatPipe',\r\n})\r\nexport class TimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n else {\r\n return new Date(value).toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { DateFormatPipe } from './pipes/date-format.pipe';\r\nimport { DateTimeFormatPipe } from './pipes/date-time-format.pipe';\r\nimport { TimeFormatPipe } from './pipes/time-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n imports: [],\r\n exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n})\r\nexport class StDateFormatModule {}\r\n","/*\r\n * Public API Surface of ngx-st-date-format\r\n */\r\n\r\nexport * from './lib/pipes/date-format.pipe';\r\nexport * from './lib/pipes/date-time-format.pipe';\r\nexport * from './lib/pipes/time-format.pipe';\r\nexport * from './lib/ngx-st-date-format.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,SAAS,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,kBAAkB,EAAE,CAAC;AACnC,aAAA;AACI,iBAAA;gBACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC7C,aAAA;AACF,SAAA;AACI,aAAA;AACH,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;KACF;;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@ -1,120 +1,108 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
|
-
class DateFormatPipe {
|
|
5
|
-
constructor() { }
|
|
6
|
-
transform(value) {
|
|
7
|
-
if (value) {
|
|
8
|
-
if (value instanceof Date) {
|
|
9
|
-
return value.toLocaleDateString();
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return new Date(value).toLocaleDateString();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
-
type: Pipe,
|
|
24
|
-
args: [{
|
|
25
|
-
name: 'stDateFormatPipe',
|
|
26
|
-
}]
|
|
4
|
+
class DateFormatPipe {
|
|
5
|
+
constructor() { }
|
|
6
|
+
transform(value) {
|
|
7
|
+
if (value) {
|
|
8
|
+
if (value instanceof Date) {
|
|
9
|
+
return value.toLocaleDateString();
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return new Date(value).toLocaleDateString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
DateFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
21
|
+
DateFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, name: "stDateFormatPipe" });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateFormatPipe, decorators: [{
|
|
23
|
+
type: Pipe,
|
|
24
|
+
args: [{
|
|
25
|
+
name: 'stDateFormatPipe',
|
|
26
|
+
}]
|
|
27
27
|
}], ctorParameters: function () { return []; } });
|
|
28
28
|
|
|
29
|
-
class DateTimeFormatPipe {
|
|
30
|
-
constructor() { }
|
|
31
|
-
transform(value) {
|
|
32
|
-
if (value) {
|
|
33
|
-
if (value instanceof Date) {
|
|
34
|
-
return value.toLocaleString();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return new Date(value).toLocaleString();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
48
|
-
type: Pipe,
|
|
49
|
-
args: [{
|
|
50
|
-
name: 'stDateTimeFormatPipe',
|
|
51
|
-
}]
|
|
29
|
+
class DateTimeFormatPipe {
|
|
30
|
+
constructor() { }
|
|
31
|
+
transform(value) {
|
|
32
|
+
if (value) {
|
|
33
|
+
if (value instanceof Date) {
|
|
34
|
+
return value.toLocaleString();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return new Date(value).toLocaleString();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
DateTimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
46
|
+
DateTimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, name: "stDateTimeFormatPipe" });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateTimeFormatPipe, decorators: [{
|
|
48
|
+
type: Pipe,
|
|
49
|
+
args: [{
|
|
50
|
+
name: 'stDateTimeFormatPipe',
|
|
51
|
+
}]
|
|
52
52
|
}], ctorParameters: function () { return []; } });
|
|
53
53
|
|
|
54
|
-
class TimeFormatPipe {
|
|
55
|
-
constructor() { }
|
|
56
|
-
transform(value) {
|
|
57
|
-
if (value) {
|
|
58
|
-
if (value instanceof Date) {
|
|
59
|
-
return value.toLocaleTimeString([], {
|
|
60
|
-
hour: '2-digit',
|
|
61
|
-
minute: '2-digit',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return new Date(value).toLocaleTimeString([], {
|
|
66
|
-
hour: '2-digit',
|
|
67
|
-
minute: '2-digit',
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
-
type: Pipe,
|
|
80
|
-
args: [{
|
|
81
|
-
name: 'stTimeFormatPipe',
|
|
82
|
-
}]
|
|
54
|
+
class TimeFormatPipe {
|
|
55
|
+
constructor() { }
|
|
56
|
+
transform(value) {
|
|
57
|
+
if (value) {
|
|
58
|
+
if (value instanceof Date) {
|
|
59
|
+
return value.toLocaleTimeString([], {
|
|
60
|
+
hour: '2-digit',
|
|
61
|
+
minute: '2-digit',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return new Date(value).toLocaleTimeString([], {
|
|
66
|
+
hour: '2-digit',
|
|
67
|
+
minute: '2-digit',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
TimeFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
77
|
+
TimeFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, name: "stTimeFormatPipe" });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TimeFormatPipe, decorators: [{
|
|
79
|
+
type: Pipe,
|
|
80
|
+
args: [{
|
|
81
|
+
name: 'stTimeFormatPipe',
|
|
82
|
+
}]
|
|
83
83
|
}], ctorParameters: function () { return []; } });
|
|
84
84
|
|
|
85
|
-
class
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
declarations: [
|
|
98
|
-
DateFormatPipe,
|
|
99
|
-
DateTimeFormatPipe,
|
|
100
|
-
TimeFormatPipe
|
|
101
|
-
],
|
|
102
|
-
imports: [],
|
|
103
|
-
exports: [
|
|
104
|
-
DateFormatPipe,
|
|
105
|
-
DateTimeFormatPipe,
|
|
106
|
-
TimeFormatPipe
|
|
107
|
-
]
|
|
108
|
-
}]
|
|
85
|
+
class StDateFormatModule {
|
|
86
|
+
}
|
|
87
|
+
StDateFormatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
StDateFormatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe], exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe] });
|
|
89
|
+
StDateFormatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StDateFormatModule, decorators: [{
|
|
91
|
+
type: NgModule,
|
|
92
|
+
args: [{
|
|
93
|
+
declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
94
|
+
imports: [],
|
|
95
|
+
exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],
|
|
96
|
+
}]
|
|
109
97
|
}] });
|
|
110
98
|
|
|
111
|
-
/*
|
|
112
|
-
* Public API Surface of ngx-st-date-format
|
|
99
|
+
/*
|
|
100
|
+
* Public API Surface of ngx-st-date-format
|
|
113
101
|
*/
|
|
114
102
|
|
|
115
|
-
/**
|
|
116
|
-
* Generated bundle index. Do not edit.
|
|
103
|
+
/**
|
|
104
|
+
* Generated bundle index. Do not edit.
|
|
117
105
|
*/
|
|
118
106
|
|
|
119
|
-
export { DateFormatPipe, DateTimeFormatPipe,
|
|
107
|
+
export { DateFormatPipe, DateTimeFormatPipe, StDateFormatModule, TimeFormatPipe };
|
|
120
108
|
//# sourceMappingURL=ngx-st-date-format.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stDateFormatPipe',\n})\nexport class DateFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleDateString();\n }\n else {\n return new Date(value).toLocaleDateString();\n }\n }\n else {\n return '';\n }\n }\n}\n","import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stDateTimeFormatPipe',\n})\nexport class DateTimeFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleString();\n } else {\n return new Date(value).toLocaleString();\n }\n } else {\n return '';\n }\n }\n}\n","import {Pipe, PipeTransform} from \"@angular/core\";\n\n@Pipe({\n name: 'stTimeFormatPipe',\n})\nexport class TimeFormatPipe implements PipeTransform {\n constructor() {}\n\n transform(value: string | Date | undefined): string {\n if (value) {\n if (value instanceof Date) {\n return value.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n }\n else {\n return new Date(value).toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n });\n }\n }\n else {\n return '';\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport {DateFormatPipe} from
|
|
1
|
+
{"version":3,"file":"ngx-st-date-format.mjs","sources":["../../../projects/ngx-st-date-format/src/lib/pipes/date-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/date-time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/pipes/time-format.pipe.ts","../../../projects/ngx-st-date-format/src/lib/ngx-st-date-format.module.ts","../../../projects/ngx-st-date-format/src/public-api.ts","../../../projects/ngx-st-date-format/src/ngx-st-date-format.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateFormatPipe',\r\n})\r\nexport class DateFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleDateString();\r\n }\r\n else {\r\n return new Date(value).toLocaleDateString();\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stDateTimeFormatPipe',\r\n})\r\nexport class DateTimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleString();\r\n } else {\r\n return new Date(value).toLocaleString();\r\n }\r\n } else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: 'stTimeFormatPipe',\r\n})\r\nexport class TimeFormatPipe implements PipeTransform {\r\n constructor() {}\r\n\r\n transform(value: string | Date | undefined): string {\r\n if (value) {\r\n if (value instanceof Date) {\r\n return value.toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n else {\r\n return new Date(value).toLocaleTimeString([], {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n });\r\n }\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { DateFormatPipe } from './pipes/date-format.pipe';\r\nimport { DateTimeFormatPipe } from './pipes/date-time-format.pipe';\r\nimport { TimeFormatPipe } from './pipes/time-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n imports: [],\r\n exports: [DateFormatPipe, DateTimeFormatPipe, TimeFormatPipe],\r\n})\r\nexport class StDateFormatModule {}\r\n","/*\r\n * Public API Surface of ngx-st-date-format\r\n */\r\n\r\nexport * from './lib/pipes/date-format.pipe';\r\nexport * from './lib/pipes/date-time-format.pipe';\r\nexport * from './lib/pipes/time-format.pipe';\r\nexport * from './lib/ngx-st-date-format.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,cAAc,CAAA;AACzB,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,SAAS,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,kBAAkB,EAAE,CAAC;AACnC,aAAA;AACI,iBAAA;gBACH,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC7C,aAAA;AACF,SAAA;AACI,aAAA;AACH,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;KACF;;4GAfU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;0GAAd,cAAc,EAAA,IAAA,EAAA,kBAAA,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,kBAAkB;AACzB,iBAAA,CAAA;;;MCCY,kBAAkB,CAAA;AAC7B,IAAA,WAAA,GAAA,GAAgB;AAEhB,IAAA,SAAS,CAAC,KAAgC,EAAA;AACxC,QAAA,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,OAAO,KAAK,CAAC,cAAc,EAAE,CAAC;AAC/B,aAAA;AA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B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,kBAAkB;AACzB,iBAAA,CAAA;;;MCMY,kBAAkB,CAAA;;gHAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAEvD,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;iHAEjD,kBAAkB,EAAA,CAAA,CAAA;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC;AAClE,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,cAAc,CAAC;AAC9D,iBAAA,CAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="ngx-st-date-format" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="ngx-st-date-format" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./pipes/date-format.pipe";
|
|
3
|
-
import * as i2 from "./pipes/date-time-format.pipe";
|
|
4
|
-
import * as i3 from "./pipes/time-format.pipe";
|
|
5
|
-
export declare class
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<
|
|
9
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./pipes/date-format.pipe";
|
|
3
|
+
import * as i2 from "./pipes/date-time-format.pipe";
|
|
4
|
+
import * as i3 from "./pipes/time-format.pipe";
|
|
5
|
+
export declare class StDateFormatModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StDateFormatModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<StDateFormatModule, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe], never, [typeof i1.DateFormatPipe, typeof i2.DateTimeFormatPipe, typeof i3.TimeFormatPipe]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<StDateFormatModule>;
|
|
9
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DateFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe, "stDateFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DateFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe, "stDateFormatPipe", false>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DateTimeFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DateTimeFormatPipe, "stDateTimeFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DateTimeFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateTimeFormatPipe, "stDateTimeFormatPipe", false>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PipeTransform } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TimeFormatPipe implements PipeTransform {
|
|
4
|
-
constructor();
|
|
5
|
-
transform(value: string | Date | undefined): string;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimeFormatPipe, never>;
|
|
7
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TimeFormatPipe, "stTimeFormatPipe", false>;
|
|
8
|
-
}
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TimeFormatPipe implements PipeTransform {
|
|
4
|
+
constructor();
|
|
5
|
+
transform(value: string | Date | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeFormatPipe, "stTimeFormatPipe", false>;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-st-date-format",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.14",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
5
|
+
"@angular/common": "^15.2.10",
|
|
6
|
+
"@angular/core": "^15.2.10"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './lib/pipes/date-format.pipe';
|
|
2
|
-
export * from './lib/pipes/date-time-format.pipe';
|
|
3
|
-
export * from './lib/pipes/time-format.pipe';
|
|
4
|
-
export * from './lib/ngx-st-date-format.module';
|
|
1
|
+
export * from './lib/pipes/date-format.pipe';
|
|
2
|
+
export * from './lib/pipes/date-time-format.pipe';
|
|
3
|
+
export * from './lib/pipes/time-format.pipe';
|
|
4
|
+
export * from './lib/ngx-st-date-format.module';
|