@likable-hair/svelte 0.0.66 → 0.0.68
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/dates/utils.js +12 -4
- package/forms/Textfield.svelte.d.ts +1 -1
- package/package.json +1 -1
package/dates/utils.js
CHANGED
|
@@ -185,12 +185,20 @@ const dateToDayAndHourd = (date, locale = 'it') => {
|
|
|
185
185
|
period = 'pm';
|
|
186
186
|
hours -= 12;
|
|
187
187
|
}
|
|
188
|
-
else
|
|
188
|
+
else {
|
|
189
189
|
period = 'am';
|
|
190
|
-
|
|
190
|
+
}
|
|
191
|
+
let minuteFormatted = minutes.toString();
|
|
192
|
+
if (minutes < 10)
|
|
193
|
+
minuteFormatted = '0' + minutes;
|
|
194
|
+
return `${day} at ${hours}:${minuteFormatted} ${period}`;
|
|
195
|
+
}
|
|
196
|
+
else if (locale == 'it') {
|
|
197
|
+
let minutesFormatted = minutes.toString();
|
|
198
|
+
if (minutes < 10)
|
|
199
|
+
minutesFormatted = '0' + minutesFormatted;
|
|
200
|
+
return `${day} alle ${hours}:${minutesFormatted}`;
|
|
191
201
|
}
|
|
192
|
-
else if (locale == 'it')
|
|
193
|
-
return `${day} alle ${hours}:${minutes}`;
|
|
194
202
|
};
|
|
195
203
|
export const dateToString = (date, format = 'extended', locale = 'it') => {
|
|
196
204
|
switch (format) {
|