최근 검색


최근 검색 없음

James McGahn's Avatar

James McGahn

가입한 날짜: 2021년 4월 16일

·

마지막 활동: 2021년 10월 27일

팔로잉

0

팔로워

0

총 활동 수

4

투표

1

가입 플랜

1

활동 개요

님의 최근 활동 James McGahn

James McGahn님이 에 댓글을 입력함

커뮤니티 댓글 Q&A - Objects, workspaces, and rules

@...

You want it to count three days in the future but not the weekends? If so, try out the below

Assigns today -> the day of the week

If wed -> then add 5 days in seconds to now == mon

if thurs -> then add 4 days in seconds to now == mon

else -> add 3 days in seconds to now

{% assign today = 'now' | date: '%A' %}
{% if  today == 'Wednesday' %}
{{ 'now' | date: '%s' | plus:432000 | date: '%Y-%m-%d' }}
{% elsif today == 'Thursday' %}
{{ 'now' | date: '%s' | plus:345600 | date: '%Y-%m-%d' }}

{% else %}
{{ 'now' | date: '%s' | plus:259200 | date: '%Y-%m-%d' }}
{% endif %}

댓글 보기 · 2020년 7월 16일에 게시됨 · James McGahn

0

팔로워

0

투표 수

0

댓글


James McGahn님이 에 댓글을 입력함

커뮤니티 댓글 Q&A - Objects, workspaces, and rules

@...

there may be a simpler way to do it but this should work

finds day of week, minuses day of the week from 7. takes that calculates the seconds and then adds that to the current date.

test it out

{% assign today = 'now' | date: '%u' %}{% assign dayWeek = 7 | minus: today %}
{% assign seconds = dayWeek | times: 24 | times: 60 | times: 60 %}
{{ 'now' | date: '%s' | plus: seconds | date: '%Y-%m-%d' }}

댓글 보기 · 2020년 6월 05일에 게시됨 · James McGahn

0

팔로워

0

투표 수

0

댓글