time.sub

TIMEtime.subTIMEt1TIMEt2

Available inall subroutines.

Subtracts a relative time from a time.

Example

declare local var.one_day_earlier TIME;
set var.one_day_earlier = time.sub(now, 1d);
# var.one_day_earlier is now the same time yesterday

User contributed notes

BETA

Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact support@fastly.com)