robbyson-frontend-library 1.0.28 → 1.0.29

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.
@@ -55,6 +55,31 @@ var DateUtils = /** @class */ (function () {
55
55
  secondsDistance: diff,
56
56
  };
57
57
  };
58
+ DateUtils.secondsToHours = function (secondsToConvert) {
59
+ var secondsAsNumber = Number(secondsToConvert);
60
+ var valueNegative = false;
61
+ if (secondsAsNumber < 0) {
62
+ secondsAsNumber = -1 * secondsAsNumber;
63
+ valueNegative = true;
64
+ }
65
+ var hours = Math.floor(secondsAsNumber / 3600).toString();
66
+ if (parseFloat(hours) < 10) {
67
+ hours = "0".concat(hours);
68
+ }
69
+ var minutes = Math.floor((secondsAsNumber % 3600) / 60);
70
+ var seconds = Math.floor((secondsAsNumber % 3600) % 60);
71
+ var result = (parseFloat(hours) > 0
72
+ ? hours + ":" + (minutes < 10 ? "0" : "")
73
+ : "00:") +
74
+ minutes +
75
+ ":" +
76
+ (seconds < 10 ? "0" : "") +
77
+ seconds;
78
+ if (valueNegative) {
79
+ result = "- ".concat(result);
80
+ }
81
+ return result;
82
+ };
58
83
  return DateUtils;
59
84
  }());
60
85
  export { DateUtils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -1,12 +1,12 @@
1
1
  export class ProfileInfoModel {
2
2
  nickname: string;
3
3
  about: string;
4
- allowAngelFriend: boolean;
4
+ notAllowAngelFriend: boolean;
5
5
  currentPassword: string;
6
6
  newPassword: string;
7
7
  confirmPassword: string;
8
8
  }
9
9
 
10
- export class ProfileImageModel{
10
+ export class ProfileImageModel {
11
11
  image: string;
12
- }
12
+ }
@@ -41,7 +41,7 @@ export interface Result {
41
41
  name: string;
42
42
  configurationName: string;
43
43
  identification: string;
44
- paymentType: string;
44
+ paymentType: PaymentType;
45
45
  updatedAt: string;
46
46
  ruleResult?: string | null;
47
47
  effectResult?: number | null;
@@ -79,4 +79,34 @@ export class DateUtils {
79
79
  secondsDistance: diff,
80
80
  };
81
81
  }
82
+
83
+ static secondsToHours(secondsToConvert: number): string {
84
+ let secondsAsNumber = Number(secondsToConvert);
85
+ let valueNegative = false;
86
+ if (secondsAsNumber < 0) {
87
+ secondsAsNumber = -1 * secondsAsNumber;
88
+ valueNegative = true;
89
+ }
90
+
91
+ let hours: string = Math.floor(secondsAsNumber / 3600).toString();
92
+
93
+ if (parseFloat(hours) < 10) {
94
+ hours = `0${hours}`;
95
+ }
96
+
97
+ const minutes = Math.floor((secondsAsNumber % 3600) / 60);
98
+ const seconds = Math.floor((secondsAsNumber % 3600) % 60);
99
+ let result =
100
+ (parseFloat(hours) > 0
101
+ ? hours + ":" + (minutes < 10 ? "0" : "")
102
+ : "00:") +
103
+ minutes +
104
+ ":" +
105
+ (seconds < 10 ? "0" : "") +
106
+ seconds;
107
+ if (valueNegative) {
108
+ result = `- ${result}`;
109
+ }
110
+ return result;
111
+ }
82
112
  }