@eliasrrosa/tutorhub-public-assets 0.0.11 → 0.0.12

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.
@@ -13,8 +13,8 @@ import { ITime } from "./Time";
13
13
  export declare class ISO8601Time implements ITime {
14
14
  readonly originalTimeString: string;
15
15
  readonly timeValidator: IISO8601TimeValidator;
16
- readonly converter: IISO8601TimezoneConverter;
17
- readonly parser: IISO8601TimezoneParser;
16
+ readonly timezoneConverter: IISO8601TimezoneConverter;
17
+ readonly timezoneParser: IISO8601TimezoneParser;
18
18
  /**
19
19
  * Throws if format is invalid.
20
20
  * Accepted formats: HH:MM:SS, HH:MM, HH:MM:SS(+|-)HH:MM, HH:MM:SS.sssZ and HH:MM:SSZ.
@@ -19,8 +19,8 @@ class ISO8601Time {
19
19
  */
20
20
  constructor(value) {
21
21
  this.timeValidator = new ISO8601TimeValidator_1.ISO8601TimeValidator();
22
- this.converter = new ISO8601TimezoneConverter_1.ISO8601TimezoneConverter();
23
- this.parser = new ISO8601TimezoneParser_1.ISO8601TimezoneParser();
22
+ this.timezoneConverter = new ISO8601TimezoneConverter_1.ISO8601TimezoneConverter();
23
+ this.timezoneParser = new ISO8601TimezoneParser_1.ISO8601TimezoneParser();
24
24
  this.getNowTimeString = ISO8601Time.getNow;
25
25
  this.getTimezone = () => {
26
26
  return new ISO8601Timezone_1.ISO8601Timezone(this.originalTimeString);
@@ -50,7 +50,7 @@ class ISO8601Time {
50
50
  .selector.getTimezoneString(timeWithAddedHours.originalTimeString)}`);
51
51
  };
52
52
  this.addTimezone = (timezone) => {
53
- const newTimezone = typeof timezone == "number" ? this.parser.toString(timezone) : timezone;
53
+ const newTimezone = typeof timezone == "number" ? this.timezoneParser.toString(timezone) : timezone;
54
54
  return new ISO8601Time(`${this.getHoursString()}:${this.getMinutesString()}:${this.getSecondsString()}${newTimezone}`);
55
55
  };
56
56
  this.originalTimeString = value ? value : this.getNowTimeString();
@@ -1,8 +1,12 @@
1
1
  import { IISO8601Timezone } from "./ISO8601Timezone";
2
+ import { IISO8601TimezoneConverter } from "./ISO8601TimezoneConverter";
3
+ import { IISO8601TimezoneParser } from "./ISO8601TimezoneParser";
2
4
  import { ITimeValidator } from "./TimeValidator";
3
5
  export interface ITime {
4
6
  originalTimeString: string;
5
7
  timeValidator: ITimeValidator;
8
+ timezoneConverter: IISO8601TimezoneConverter;
9
+ timezoneParser: IISO8601TimezoneParser;
6
10
  /**
7
11
  * returns time string in chosen format. Default is `HH:MM`.
8
12
  *
package/dist/index.cjs CHANGED
@@ -434,8 +434,8 @@ var ISO8601Time = class _ISO8601Time {
434
434
  */
435
435
  constructor(value) {
436
436
  this.timeValidator = new ISO8601TimeValidator();
437
- this.converter = new ISO8601TimezoneConverter();
438
- this.parser = new ISO8601TimezoneParser();
437
+ this.timezoneConverter = new ISO8601TimezoneConverter();
438
+ this.timezoneParser = new ISO8601TimezoneParser();
439
439
  this.getNowTimeString = _ISO8601Time.getNow;
440
440
  this.getTimezone = () => {
441
441
  return new ISO8601Timezone(this.originalTimeString);
@@ -467,7 +467,7 @@ var ISO8601Time = class _ISO8601Time {
467
467
  );
468
468
  };
469
469
  this.addTimezone = (timezone) => {
470
- const newTimezone = typeof timezone == "number" ? this.parser.toString(timezone) : timezone;
470
+ const newTimezone = typeof timezone == "number" ? this.timezoneParser.toString(timezone) : timezone;
471
471
  return new _ISO8601Time(
472
472
  `${this.getHoursString()}:${this.getMinutesString()}:${this.getSecondsString()}${newTimezone}`
473
473
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eliasrrosa/tutorhub-public-assets",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Assets, mainly interfaces, to be shared among different Tutorhub apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",