fromnow 関数

説明

現在時刻からの指定時間が経過した時刻を求めます。

引数

  • 引数1 ... 数値
  • 引数2 ... 単位

単位は以下のいずれかの単位名指定します。

単位名 意味
hours 時間
minutes
seconds
days
weeks
months
months_firstday 月のはじめ
months_lastday 月末
years

使用例

例)現在から2日後を求める

= fromnow(2, "days")

例)1か月前を求める

= fromnow(-1, "months")

例)当月のついたちを求める

= fromnow(0, "months_firstday")

Copyright © R3 institute. All rights reserved.

Powered by Everysite