Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cal-jp-holiday

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cal-jp-holiday

  • 1.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Calendar::Japanese::Holiday

Author:: yy http://dishhh.jp/ Version:: 1.1 License:: MIT

== Description ���{�̏j�����������W���[���B

Date�ATime�ADateTime �N���X�� Calendar::Japanese::Holiday ���W���[���� Mix-in ���邱�ƂŁA ���{�̏j�������擾����@�\���lj������B Date�ATime�ADateTime �ȊO�̃N���X�ł����Ă� year�Amonth�Aday �����ƒN���X�ł���Η��p���邱�Ƃ��ł���B

�x�����ǂ�����Ԃ�

date.holiday?

�j���̖��O��Ԃ�

date.holiday

�y�����ǂ�����Ԃ�

date.weekend?

�j�����ǂ�����Ԃ�

date.national_holiday?

�U�֋x�����ǂ�����Ԃ�

date.substitute_holiday?

Holiday#holiday?() ���\�b�h�́uweekend? or national_holiday? or substitute_holiday?�v�Ɠ����B ���̂��ߏj���݂̂𔻒肵�����ꍇ�� national_holiday?() �� substitute_holiday?() ���\�b�h���g�p����B

Holiday#holiday() ���\�b�h�Ŏ擾�����j�����͓��{��}���`�o�C�g���������A �g�p����镶���R�[�h�̓v���b�g�t�H�[���ɉ����Ď����I�ɑI�������B ��������ɕ����R�[�h���擾�ł��Ȃ��ꍇ�́A Holiday.set_nkf_opts() ���\�b�h��p���Ė����I�ɕ����R�[�h���w�肷�邱�Ƃ��ł���B

���̃X�N���v�g�͎R�{�Ă���́u�j���Ή��J�����_�[�v���x�[�X�ɂ��Ă��܂��B

[�u�j���Ή��J�����_�[�v] http://itdict.ddo.jp/~yamamoto/Script/Calendar/

== Install

=== gem

sudo gem install calendar-japanese-holiday

=== svn

svn co svn://rubyforge.org/var/svn/calendar-japanese-holiday/trunk ./

=== tgz

download: http://rubyforge.org/projects/calendar-japanese-holiday

== Sample

=== case 1 require 'calendar/japanese/holiday' require 'date'

Date �N���X�� Mix-in ����

class Date include Calendar::Japanese::Holiday end

today = Date.today if today.national_holiday? puts today.holiday end

=== case 2

Time �I�u�W�F�N�g�� Mix-in ����

puts Time.now.extend(Calendar::Japanese::Holiday).holiday

=== case 3

Mix-in �����ɗ��p���� (deprecated)

holiday = Calendar::Japanese::Holiday.holiday_info Time.now puts holiday.name if info.is_national

=== case 4

�����R�[�h�������I�� EUC �Ɏw�肷��

Calendar::Japanese::Holiday.set_opts "-e" puts Date.parse("2008-01-01").extend(Calendar::Japanese::Holiday).holiday

FAQs

Package last updated on 25 Jul 2009

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc