disacomp-dateservice 1.0.2 → 1.0.3

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/index.d.ts CHANGED
@@ -11,6 +11,7 @@ interface IDateManipulator {
11
11
  getPeriodFromDate(date: string): string;
12
12
  isValidDate(date: string): boolean;
13
13
  getSignDate(): string;
14
+ getISODateStringFromString(date: string): string;
14
15
  }
15
16
  declare class DateService {
16
17
  private dateManipulator;
@@ -22,6 +23,7 @@ declare class DateService {
22
23
  getPeriodFromDate(date: string): string;
23
24
  isValidDate(dateString: string): boolean;
24
25
  getSignDate(): string;
26
+ getISODateStringFromString(date: string): string;
25
27
  }
26
28
  declare const DisacompDateService: DateService;
27
29
  export default DisacompDateService;
package/dist/index.js CHANGED
@@ -128,6 +128,10 @@ class DateManipulator {
128
128
  const sec = this.addCeroAtBegin(date.getSeconds());
129
129
  return `${day}-${month}-${year} ${hours}:${min}:${sec}`;
130
130
  }
131
+ getISODateStringFromString(date) {
132
+ const [day, month, year] = date.split("-").map(Number);
133
+ return `${year}-${this.addCeroAtBegin(month)}-${this.addCeroAtBegin(day)}`;
134
+ }
131
135
  }
132
136
  class DateService {
133
137
  constructor(dateManipulator) {
@@ -154,6 +158,9 @@ class DateService {
154
158
  getSignDate() {
155
159
  return this.dateManipulator.getSignDate();
156
160
  }
161
+ getISODateStringFromString(date) {
162
+ return this.dateManipulator.getISODateStringFromString(date);
163
+ }
157
164
  }
158
165
  const DisacompDateService = new DateService(new DateManipulator());
159
166
  exports.default = DisacompDateService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disacomp-dateservice",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Disacomp Date Service",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../../../usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.full.d.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"994c234848afc14a2586b6565777f4c0b05dc479ede0a041bfd5becf6dceb586",{"version":"2f251c617e0156b2abac061de2eaf844c9d652cdf208ca54b219c9115358fb88","signature":"fd73947b1680f8406cf9726048519845f73ae98b68abbcd46728fb926fd5aadb"}],"root":[27],"options":{"composite":true,"module":1,"noImplicitAny":true,"noImplicitThis":true,"outDir":"./dist","removeComments":true,"rootDir":"./src","strict":true,"strictNullChecks":true,"target":4},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[27,24,25,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,26,22,19,20,21,23,1,8,7],"latestChangedDtsFile":"./dist/index.d.ts"},"version":"5.1.6"}
1
+ {"program":{"fileNames":["../../../../../usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../../usr/local/lib/node_modules/typescript/lib/lib.es2017.full.d.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"994c234848afc14a2586b6565777f4c0b05dc479ede0a041bfd5becf6dceb586",{"version":"03090d132ef006986522135d56b70b04304c49fb91a0f78c94e2b0ecd92e39ae","signature":"213ee2e4b19d70af1c66ec975e2c27fe3c7f8531d05a628270eb52f821786e00"}],"root":[27],"options":{"composite":true,"module":1,"noImplicitAny":true,"noImplicitThis":true,"outDir":"./dist","removeComments":true,"rootDir":"./src","strict":true,"strictNullChecks":true,"target":4},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[27,24,25,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,26,22,19,20,21,23,1,8,7],"latestChangedDtsFile":"./dist/index.d.ts"},"version":"5.1.6"}