0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

rex0220 アプリ集計プラグイン 翌月締日以降の営業日

Last updated at Posted at 2023-10-25

アプリ集計プラグインで、翌月締日以降の営業日を取得します。

概要

日付の翌月10日以降の営業日を締日として、取得します。

  • 10日以降に営業日がある前提
  • 土日は休日
  • 祝日は、休日管理アプリに設定

2023-10-25_14h24_00.png

操作例

2023-10-25_14h28_57.gif

アプリ集計プラグインの設定

2023-10-25_14h30_50.png

  • 自動・ボタン別設定
    2023-10-25_14h37_08.png

  • 対象アプリ条件
    2023-10-25_14h31_12.png

  • 集計項目
    2023-10-25_14h31_44.png

.js
// 翌月締め日
LET(
  c,DATE_ADD(#日付,1,"month","YYYY-MM-10"),
  x,TDSIF(
    AND(DATE_FORMAT(date)>=c,
      IN(type,"祝日","休日")),
    DATE_FORMAT(date)
  ),
  dt,"",
  w,ARRAY_FOR(21,idx,
     IF(NOT(dt),LET(
        w1,DATE_ADD(c,idx,"day"),
        IF(OR(IN(x,w1),IN(DATE_FORMAT(w1,"e"),"0","6")),,FSET(dt,w1))
     ))
  ),
  dt
)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?