mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Fix digest date issues
Fix today and yesterday offsets Use current date in empty post list error
This commit is contained in:
parent
7b5528b59f
commit
f7594403b7
3 changed files with 4 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
{{else}}
|
||||
<div class="grid-small grid-block dialog">
|
||||
<p>{{i18n "Sorry, no posts for today"}}.</p>
|
||||
<p>{{i18n "Sorry, no posts for"}} {{currentDate}}.</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
|
|
|
@ -23,9 +23,9 @@ Template[getTemplate('posts_digest')].helpers({
|
|||
var currentDate=moment(Session.get('currentDate'));
|
||||
var today=moment(new Date());
|
||||
var diff=today.diff(currentDate, 'days');
|
||||
if(diff === 1)
|
||||
if(diff === 0)
|
||||
return i18n.t("Today");
|
||||
if(diff === 2)
|
||||
if(diff === 1)
|
||||
return i18n.t("Yesterday");
|
||||
return currentDate.format("dddd, MMMM Do YYYY");
|
||||
},
|
||||
|
|
|
@ -53,6 +53,7 @@ i18n.translations.en = {
|
|||
"Previous Day": "Previous Day",
|
||||
"Next Day": "Next Day",
|
||||
"Sorry, no posts for today": "Sorry, no posts for today",
|
||||
"Sorry, no posts for": "Sorry, no posts for",
|
||||
"Today": "Today",
|
||||
"Yesterday": "Yesterday",
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue