-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated createTimestamp.ts and removed eslint.xml
- Loading branch information
Clerise Swart
committed
Nov 19, 2024
1 parent
a584901
commit 8e73efa
Showing
3 changed files
with
32 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
52 changes: 26 additions & 26 deletions
52
.../MyParcelDeliveryOptions/Pickup/PickupLocationOpeningHours/PickupLocationOpeningHours.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import {format} from 'date-fns'; | ||
import {type DateLike, normalizeDate} from '@vueuse/core'; | ||
import {type Timestamp} from '@myparcel/sdk'; | ||
import {API_DATE_FORMAT} from '../data'; | ||
import {API_DATE_FORMAT, DEFAULT_TIMEZONE_TYPE, DEFAULT_TIMEZONE} from '../data'; | ||
|
||
export const createTimestamp = (date: DateLike = new Date()): Timestamp => { | ||
export const createTimestamp = ( | ||
date: DateLike = new Date(), | ||
): {date: string; timezone: string; timezone_type: number} => { | ||
return { | ||
date: format(normalizeDate(date), API_DATE_FORMAT), | ||
timezone: 'GMT', | ||
timezone_type: 0, | ||
timezone: DEFAULT_TIMEZONE, | ||
timezone_type: DEFAULT_TIMEZONE_TYPE, | ||
}; | ||
}; |