Your SlideShare is downloading. ×
  • Like
Time band
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

Perl-Module Time::Band intro

Perl-Module Time::Band intro

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
195
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Time::Band.pm 時間 " 帯 " の加減をするモジュール
  • 2. 今 YAPC の前夜祭中 フリービール飲んで調子に載ってる。 t ku_bass◯ さんから 「解説記事待ち」 とツイートされたので、書いてみた。
  • 3. こんなことしたいです。其ノ一 時間帯の加算 9:00 - 15:00 16:00 - 22:00 9:00 - 22:00
  • 4. こんなことしたいです。其ノ二 時間帯の減算 9:00 - 22:00 12:00 - 18:59 9:00 - 11:59 19:00 - 22:00
  • 5. そんなことを したい人 他にもいるよ ね !!!
  • 6. 作りました !!? Time::Band!! https://github.com/rozary/p5-Time-Band
  • 7. こんな使い方 @ 加算 my $start1 = #Time::Piece; my $start2 = #Time::Piece; my $tb = Time::Band->new($start1,$end2); $tb->add($start3,$start4); my $res = $tb->result();
  • 8. print Dumper $res; [ [ Time::Piece, Time::Piece ] ] で、こんな結果 @ 加算
  • 9. こんな使い方 @ 減算 my $start1 = #Time::Piece; my $start2 = #Time::Piece; my $tb = Time::Band->new($start1,$end2); $tb->except($start3,$start4); my $res = $tb->result();
  • 10. で、こんな結果 @ 減算 [ [ Time::Piece, Time::Piece ],[ Time::Piece, Time::Piece ], ]
  • 11. テスト 募集 !!!
  • 12. そして、 YAPC 最 高 !!