Updates related to the time being in 24 vs 12 hour format.

This commit is contained in:
Scott Idem
2024-11-13 10:43:44 -05:00
parent 26e1c89f1b
commit 7040578ac5
11 changed files with 59 additions and 55 deletions

View File

@@ -68,9 +68,12 @@ export let iso_datetime_formatter = function iso_datetime_formatter(
case 'datetime_iso_tz':
datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss Z');
break;
case 'datetime_12_no_seconds':
case 'datetime_iso_12_no_seconds':
datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A');
break;
// case 'datetime_12_no_seconds':
// datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A');
// break;
case 'datetime_short':
datetime_string = dayjs(raw_datetime).format('MMM D, YY HH:mm');
break;

View File

@@ -122,9 +122,9 @@ let lq_kv__person_obj_li = liveQuery(
{/if}
<td class="px-4 py-2">
{ae_util.iso_datetime_formatter(person_obj?.created_on, 'datetime_12_no_seconds')}
{ae_util.iso_datetime_formatter(person_obj?.created_on, 'datetime_iso_12_no_seconds')}
<br>
{ae_util.iso_datetime_formatter(person_obj?.updated_on, 'datetime_12_no_seconds')}
{ae_util.iso_datetime_formatter(person_obj?.updated_on, 'datetime_iso_12_no_seconds')}
</td>
</tr>
{/each}

View File

@@ -127,7 +127,7 @@ if (log_lvl) {
{event_presenter_obj?.event_session_name}
</a>
</td>
<td class="px-4 py-2 text-sm">{ae_util.iso_datetime_formatter(event_presenter_obj?.event_session_start_datetime, 'datetime_12_no_seconds')}</td>
<td class="px-4 py-2 text-sm">{ae_util.iso_datetime_formatter(event_presenter_obj?.event_session_start_datetime, 'datetime_iso_12_no_seconds')}</td>
{/if}
{#if show_presentation_fields}
@@ -135,7 +135,7 @@ if (log_lvl) {
<td class="px-4 py-2 lg:text-xs">{ae_util.iso_datetime_formatter(event_presenter_obj?.event_presentation_start_datetime, 'time_12_short')}</td>
{/if}
<td class="px-4 py-2 text-sm">{ae_util.iso_datetime_formatter(event_presenter_obj?.updated_on, 'datetime_12_no_seconds')}</td>
<td class="px-4 py-2 text-sm">{ae_util.iso_datetime_formatter(event_presenter_obj?.updated_on, 'datetime_iso_12_no_seconds')}</td>
</tr>
{/each}

View File

@@ -295,7 +295,7 @@ let lq_kv__event_file_obj_li = liveQuery(
{event_file_obj?.event_session_name}
</a>
</td>
<td class="px-4 py-2">{ae_util.iso_datetime_formatter(event_file_obj?.event_session_start_datetime, 'datetime_12_no_seconds')}</td>
<td class="px-4 py-2">{ae_util.iso_datetime_formatter(event_file_obj?.event_session_start_datetime, 'datetime_iso_12_no_seconds')}</td>
{/if}
{#if show_presentation_fields}
<td class="px-4 py-2 lg:text-xs">

View File

@@ -83,7 +83,7 @@ if (log_lvl) {
</a>
</td>
<td class="px-4 py-2">
{ae_util.iso_datetime_formatter(event_session_obj?.start_datetime, 'datetime_12_no_seconds')}
{ae_util.iso_datetime_formatter(event_session_obj?.start_datetime, 'datetime_iso_12_no_seconds')}
</td>
{#if show_location_fields}
<td class="px-4 py-2">

View File

@@ -228,13 +228,13 @@ let ae_promises: key_val = {};
<span
class="archive_content__created_on"
>
Created on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.created_on, 'datetime_short')}
Created on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.created_on, 'datetime_12_short')}
</span>
<span
class="archive_content__updated_on"
class:hidden={!idaa_archive_content_obj.updated_on}
>
Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_short')}
Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_12_short')}
</span>
</span>
</section>

View File

@@ -60,12 +60,12 @@ onMount(() => {
class:hidden={!$ae_loc.administrator_access}
>
<span class="ae_label">Created on:</span>
<span class="ae_value archive__created_on">{ae_util.iso_datetime_formatter($lq__archive_obj?.created_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value archive__created_on">{ae_util.iso_datetime_formatter($lq__archive_obj?.created_on, 'datetime_iso_12_no_seconds')}</span>
</span>
{#if $lq__archive_obj?.updated_on}
<span>
<span class="ae_label">Updated on:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter($lq__archive_obj?.updated_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter($lq__archive_obj?.updated_on, 'datetime_iso_12_no_seconds')}</span>
</span>
{/if}
</div>

View File

@@ -90,7 +90,8 @@ onDestroy(() => {
<div class="post__header">
<h2 class="post__title flex flex-row gap-2 items-center">
<span class="h3">
{@html $idaa_slct.post_obj?.title ?? 'New Post'} - {$idaa_slct.post_obj?.id ?? 'Not Yet Saved'}
{@html $idaa_slct.post_obj?.title ?? 'New Post'}
<!-- - {$idaa_slct.post_obj?.id ?? 'Not Yet Saved'} -->
</span>
{#if $idaa_slct.post_obj?.topic_id}<span class="badge badge-info variant-glass-secondary"><span class="fas fa-user-md m-1"></span> {$idaa_slct.post_obj?.topic_name}</span>{/if}
</h2>
@@ -125,15 +126,15 @@ onDestroy(() => {
<div class="post__created_on_updated_on">
{#if !$idaa_slct.post_obj.updated_on}
<span class="ae_label">Created on:</span>
<span class="ae_value post__created_on">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.created_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value post__created_on">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.created_on, 'datetime_iso_12_no_seconds')}</span>
{:else}
<span class="ae_label">Updated on:</span>
<span class="ae_value post__updated_on">
{ae_util.iso_datetime_formatter($idaa_slct.post_obj.updated_on, 'datetime_iso_no_seconds')}</span>
{ae_util.iso_datetime_formatter($idaa_slct.post_obj.updated_on, 'datetime_iso_12_no_seconds')}</span>
{/if}
<span class="post__archive_on">
<span class="ae_label">Archive on:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.archive_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter($idaa_slct.post_obj.archive_on, 'datetime_iso_12_no_seconds')}</span>
</span>
</div>
</div>
@@ -215,10 +216,10 @@ onDestroy(() => {
</span>
<span class="post_comment__created_on_updated_on">
Created on:
<span class="post_comment__created_on">{ae_util.iso_datetime_formatter(post_comment_obj.created_on, 'datetime_iso_no_seconds')}
<span class="post_comment__created_on">{ae_util.iso_datetime_formatter(post_comment_obj.created_on, 'datetime_iso_12_no_seconds')}
{#if post_comment_obj.updated_on}
Updated on:
{ae_util.iso_datetime_formatter(post_comment_obj.updated_on, 'datetime_iso_no_seconds')}
{ae_util.iso_datetime_formatter(post_comment_obj.updated_on, 'datetime_iso_12_no_seconds')}
{/if}
</span>
</div>

View File

@@ -111,18 +111,18 @@ onMount(() => {
class="post__created_on"
>
<span class="ae_label">Created on:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(idaa_post_obj.created_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(idaa_post_obj.created_on, 'datetime_iso_12_no_seconds')}</span>
</span>
{:else}
<span
class="post__updated_on"
>
<span class="ae_label">Updated on:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(idaa_post_obj.updated_on, 'datetime_iso_no_seconds')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(idaa_post_obj.updated_on, 'datetime_iso_12_no_seconds')}</span>
</span>
{/if}
{#if idaa_post_obj.archive_on}
<span class="post__archive_on">Archive on: {ae_util.iso_datetime_formatter(idaa_post_obj.archive_on, 'datetime_iso_no_seconds')}</span>
<span class="post__archive_on">Archive on: {ae_util.iso_datetime_formatter(idaa_post_obj.archive_on, 'datetime_iso_12_no_seconds')}</span>
{/if}
</div>
{/if}

View File

@@ -210,40 +210,40 @@ onDestroy(() => {
</div>
<div class="meeting_recurring_time">
{#if $lq__event_obj?.recurring_start_time}
<span class="meeting_recurring_start_time">
<span class="ae_label">
<span class="fas fa-clock"></span> Start time:
<span class="meeting_recurring_start_time">
<span class="ae_label">
<span class="fas fa-clock"></span> Start time:
</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_start_time}`, 'time_12_short')}</span>
</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_start_time}`, 'time_short')}</span>
</span>
<span
class:ae_d_none={!$lq__event_obj?.recurring_end_time}
>
- <span class="meeting_recurring_end_time">
<span class="ae_label">End time:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_end_time}`, 'time_short')}
<span
class:ae_d_none={!$lq__event_obj?.recurring_end_time}
>
- <span class="meeting_recurring_end_time">
<span class="ae_label">End time:</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_end_time}`, 'time_12_short')}
</span>
</span>
</span>
</span>
<span
class:ae_d_none={!$lq__event_obj?.timezone}
>
- <span class="meeting_timezone">
<span class="ae_label">Timezone:</span>
<span class="ae_value">{$lq__event_obj?.timezone}</span>
<span
class:ae_d_none={!$lq__event_obj?.timezone}
>
- <span class="meeting_timezone">
<span class="ae_label">Timezone:</span>
<span class="ae_value">{$lq__event_obj?.timezone}</span>
</span>
</span>
</span>
{#if $lq__event_obj?.timezone}
<span class="event__user_timezone">
(
<span class="ae_label">Your TZ:</span>
<span class="ae_value">
<!-- {dayjs.tz(`${$ae_loc.current_date_str} ${$lq__event_obj?.recurring_start_time}`, $lq__event_obj?.timezone).tz($ae_loc.current_timezone).format('hh:mm A')} {$ae_loc.current_timezone} -->
DAYJS DISABLED
</span>
)
</span>
{/if}
{#if $lq__event_obj?.timezone}
<span class="event__user_timezone">
(
<span class="ae_label">Your TZ:</span>
<span class="ae_value">
<!-- {dayjs.tz(`${$ae_loc.current_date_str} ${$lq__event_obj?.recurring_start_time}`, $lq__event_obj?.timezone).tz($ae_loc.current_timezone).format('hh:mm A')} {$ae_loc.current_timezone} -->
DAYJS DISABLED
</span>
)
</span>
{/if}
{:else}
<span class="meeting_recurring_no_time">No times set</span>
{/if}
@@ -333,13 +333,13 @@ onDestroy(() => {
<span
class="event__created_on"
>
Created on: {ae_util.iso_datetime_formatter($lq__event_obj?.created_on, 'datetime_short')}
Created on: {ae_util.iso_datetime_formatter($lq__event_obj?.created_on, 'datetime_12_short')}
</span>
<span
class="event__updated_on"
class:ae_d_none={!$lq__event_obj?.updated_on}
>
Updated on: {ae_util.iso_datetime_formatter($lq__event_obj?.updated_on, 'datetime_short')}
Updated on: {ae_util.iso_datetime_formatter($lq__event_obj?.updated_on, 'datetime_12_short')}
</span>
</section>

View File

@@ -167,7 +167,7 @@ onMount(() => {
{#if idaa_event_obj?.recurring_start_time}
<!-- <span class="ae_label">Time:</span> -->
<span class="ae_value">{ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj?.recurring_start_time}`, 'time_short')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj?.recurring_start_time}`, 'time_12_short')}</span>
{/if}
{#if idaa_event_obj?.timezone}
<!-- <span class="ae_label">Timezone:</span> -->
@@ -281,13 +281,13 @@ onMount(() => {
<span
class="event__created_on"
>
Created on: {ae_util.iso_datetime_formatter(idaa_event_obj?.created_on, 'datetime_short')}
Created on: {ae_util.iso_datetime_formatter(idaa_event_obj?.created_on, 'datetime_12_short')}
</span>
<span
class="event__updated_on"
class:ae_d_none={!idaa_event_obj?.updated_on}
>
Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj?.updated_on, 'datetime_short')}
Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj?.updated_on, 'datetime_12_short')}
</span>
</div>
</section>