Skip to content

Instantly share code, notes, and snippets.

@need4spd
Created November 29, 2012 00:54
Show Gist options
  • Save need4spd/4165955 to your computer and use it in GitHub Desktop.
Save need4spd/4165955 to your computer and use it in GitHub Desktop.
[Ruby] Date연산
require 'date'
startDate=Date.new(1901,1,1)
endDate=Date.new(2000,12,31)
startDate === endDate #비교, =가 3개
startDate.wday == 0 #요일, 0이 일요일
startDate.mday == 1 #month of day
startDate = startDate + 1 #하루 증가
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment