Skip to content

Instantly share code, notes, and snippets.

@OlegShchavelev
Created August 21, 2017 16:21
Show Gist options
  • Save OlegShchavelev/ac558b6a539e41e4d9863a0b90e879f4 to your computer and use it in GitHub Desktop.
Save OlegShchavelev/ac558b6a539e41e4d9863a0b90e879f4 to your computer and use it in GitHub Desktop.
DaterangeTV - модификация даты, событие в один день или в период
{var $dates = $detali|split:'||'}
{var $start = $dates[0]|date_format: '%d.%m.%Y'}
{var $finish = $dates[1]|date_format: '%d.%m.%Y'}
{var $time = "{$start} - {$finish}"}
{if $start == $finish}
{var $time = "{$start}"}
{/if}
{$time}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment