Sha256: f766d439ed854ab4fdfe3d3cfc4108c8efcd8768c989b8a20a375de77e090a19
Contents?: true
Size: 384 Bytes
Versions: 126
Compression:
Stored size: 384 Bytes
Contents
# frozen_string_literal: true class ReeDate::IsWeekDay include Ree::FnDSL fn :is_week_day do link :today link 'ree_date/functions/constants', -> { WEEKEND_DAYS } end doc("Returns true if the date does not fall on a Saturday or Sunday.") contract(Nilor[Date] => Bool) def call(date = nil) date = date || today !WEEKEND_DAYS.include?(date.wday) end end
Version data entries
126 entries across 126 versions & 1 rubygems