Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

how to get current month end date in ruby

	start_date = (Date.current - 1.months).in_time_zone("America/New_York").beginning_of_month.utc
	start_date = start_date.strftime("%d/%m/%Y")
	end_date = (Date.current - 1.months).in_time_zone("America/New_York").end_of_month.utc
	end_date = end_date.strftime("%d/%m/%Y"
 
PREVIOUS NEXT
Tagged: #current #month #date #ruby
ADD COMMENT
Topic
Name
6+6 =