Skip to content

Instantly share code, notes, and snippets.

@yongbin
Created January 20, 2012 07:34
Show Gist options
  • Select an option

  • Save yongbin/1646007 to your computer and use it in GitHub Desktop.

Select an option

Save yongbin/1646007 to your computer and use it in GitHub Desktop.
is_bizday
#!/usr/bin/env perl
use Web::Query;
use DateTime;
my $dt = DateTime->now;
my $url =
sprintf 'http://www.jacom.co.kr/cgi-pub/calendar/wwwcal.cgi?year=%d&month=%d',
$dt->year, $dt->month;
my $ret = 0;
wq($url)->find("font[color='#ff0000']")->each(
sub {
my ( $i, $elm ) = @_;
$ret = -1 if $elm->text eq $dt->day;
}
);
exit $ret;
# usage: is_bizday && ./daily-report
@yongbin
Copy link
Copy Markdown
Author

yongbin commented Jan 20, 2012

@am0c 그냥 필요해서 후딱 만든 스크립트라서 ;; 정말로 달력에 '빨간날"을 검색한다는게 포인트 ㅋㅋ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment