slash-create/docs-bot

add timezone auto complete for `/temporal parse`

Closed this issue · 2 comments

brief outline includes adding a timezone argument that searches against all known values for a match similar to how /docs and /code query function

https://stackoverflow.com/a/63199512

const i18nDateLong = new Intl.DateTimeFormat('en', { dateStyle: 'short', timeStyle: 'long' });
i18nDateLong.format(new Date());
// %.at(-1) -> { type: 'timeZoneName', value: 'GMT+1' }
// ---
const i18nDateFull = new Intl.DateTimeFormat('en', { timeStyle: 'long' });
i18nDateFull.formatToParts(new Date);
// %.at(-1) -> { type: 'timeZoneName', value: 'British Summer Time' }

image

autocompletion is currently not possible for this option when it remains as INTEGER, alternative workaround would be to change it to STRING and then parse as an integer when it is sent through.