Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit d60c744

Browse files
committed
fixes date formatting on speaking page
1 parent 76cf879 commit d60c744

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

layouts/partials/events/cta.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<!-- propose button -->
5252
{{- if $e.startdate -}}
5353
{{- if $e.cfp_date_start -}}
54-
{{- if and (ge (dateFormat "2006-01-02" (dateFormat "2006-01-02" now)) (dateFormat "2006-01-02" $e.cfp_date_start)) (le (dateFormat "2006-01-02" (dateFormat "2006-01-02" now)) (dateFormat "2006-01-02" $e.cfp_date_end)) -}}
54+
{{- if and (ge now (time $e.cfp_date_start)) (le now (time $e.cfp_date_end)) -}}
5555
{{- if $e.cfp_link -}}
5656
{{- if eq $e.cfp_link "" -}}
5757
{{- $.Scratch.Set "cfp_link" ((printf "/events/%s/propose" $e.name) | absURL ) -}}

layouts/partials/speaking.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{{- $.Scratch.Add "events" "<table class = 'table sortable table-condensed'><thead><tr><th>City</th><th>&nbsp;&nbsp;CFP Closes</th><th>&nbsp;&nbsp;&nbsp;&nbsp;Event Starts</th></tr></thead><tbody>" -}}
22
{{- range sort $.Site.Data.events "startdate" -}}
33
{{- if .cfp_date_end -}}
4-
{{- if and (ge (dateFormat "2006-01-02" (dateFormat "2006-01-02" now)) (dateFormat "2006-01-02" .cfp_date_start)) (ge (dateFormat "2006-01-02" .cfp_date_end) (dateFormat "2006-01-02" (dateFormat "2006-01-02" now))) -}}
4+
{{- if and (ge now (time .cfp_date_start)) (ge (time .cfp_date_end) now) -}}
55
{{- $.Scratch.Add "events" "<tr><td><a href = '/events/" -}}
66
{{- $.Scratch.Add "events" .name -}}
77
{{- $.Scratch.Add "events" "/' class = 'speaking'>" -}}
88
{{- $.Scratch.Add "events" .city -}}
99
{{- $.Scratch.Add "events" "</a></td><td data-dateformat='YYYY-MM-DD'>&nbsp;&nbsp;" -}}
10-
{{- $.Scratch.Add "events" .cfp_date_end -}}
10+
{{- $.Scratch.Add "events" (dateFormat "2006-01-02" .cfp_date_end) -}}
1111
{{- $.Scratch.Add "events" "</td><td data-dateformat='YYYY-MM-DD'>&nbsp;&nbsp;&nbsp;&nbsp;" -}}
12-
{{- $.Scratch.Add "events" .startdate -}}
12+
{{- $.Scratch.Add "events" (dateFormat "2006-01-02" .startdate) -}}
1313
{{- $.Scratch.Add "events" "</td></tr>" -}}
1414
{{- end }} {{/* end: date is now or afterwards */}}
1515
{{- end }} {{/* end: if .cfp_date_end */}}

0 commit comments

Comments
 (0)