1
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 3 years have passed since last update.

Automation360 - 日付処理用パッケージ

Last updated at Posted at 2020-10-20

日付処理用ユーティリティ

先日作っていたサンプルBotで必要な文字列が、月の開始日と終了日。
例えば、2020年2月であれば、「20200201」と「20200230」。
開始日は1日に固定ですので良いですが、終了日は「うるう年」により変わってきてしまうのでどう作ろうかなと。。。

Automation360 標準パッケージ

まずは、標準パッケージ。
Automation360 の標準でも日付処理用のパッケージは用意されています。
ですが、できる事が結構限られてしまっています。
これだと「うるう年」の判定は出来ません。
いや、単にロジック決まっているので、そういうサブタスク組んでも良いんですけどね、でも、簡単に実装したいじゃないですか。
image.png

ということで、他のパッケージも探します・・・

AA作成のDatetime(Japan)パッケージ

https://botstore.automationanywhere.com/bot/a2019-datetime-japan/
標準パッケージでは出来ない、祝日の判定や「令和」とかにも対応しています。
いいですね。。。でも、「うるう年」の判定は無いと。

image.png

ということで、更にパッケージをチェック。。。

A2019 - Datetime Utilities

https://botstore.automationanywhere.com/bot/a2019-datetime-utilities/
こちらは、日本のパートナーさんが作ったパッケージのようですね。

ありました!!!
うるう年=Leap Year。「Is Leap Year」アクション発見です!

image.png

早速試してみます。

image.png

良い感じ♪
image.png

他にも、Get Length of Monthというのがありますので、最終日はこれを使えば更に簡単に作れそうですね。
image.png

2021/12/23追記

A2019とAutomation360の色々変わってきていますので、そもそもこの投稿の内容が利用可能なのかもわかりませんが、
とりあえず、A2019からAutomation360に変更します。

1
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
1
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?