()
| 25 | * time zone. |
| 26 | */ |
| 27 | export const getToday = () => { |
| 28 | /** |
| 29 | * ion-datetime intentionally does not |
| 30 | * parse time zones/do automatic time zone |
| 31 | * conversion when accepting user input. |
| 32 | * However when we get today's date string, |
| 33 | * we want it formatted relative to the user's |
| 34 | * time zone. |
| 35 | * |
| 36 | * When calling toISOString(), the browser |
| 37 | * will convert the date to UTC time by either adding |
| 38 | * or subtracting the time zone offset. |
| 39 | * To work around this, we need to either add |
| 40 | * or subtract the time zone offset to the Date |
| 41 | * object prior to calling toISOString(). |
| 42 | * This allows us to get an ISO string |
| 43 | * that is in the user's time zone. |
| 44 | */ |
| 45 | return removeDateTzOffset(new Date()).toISOString(); |
| 46 | }; |
| 47 | |
| 48 | const minutes = [ |
| 49 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
no test coverage detected