method
julian?
v1_8_7_72 -
Show latest stable
-
0 notes -
Class: Date
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
Related methods
- Class methods (100)
- ajd_to_amjd
- ajd_to_jd
- amjd_to_ajd
- civil
- civil_to_jd
- commercial
- commercial_to_jd
- complete_frags
- day_fraction_to_time
- deprecated_alias
- deprecated_class_method_alias
- fix_style
- gregorian?
- gregorian_leap?
- httpdate (>= v1_9_1_378)
- _httpdate (>= v1_9_1_378)
- iso8601 (>= v1_9_1_378)
- _iso8601 (>= v1_9_1_378)
- jd
- jd_to_ajd
- jd_to_civil
- jd_to_commercial
- jd_to_ld
- jd_to_mjd
- jd_to_ordinal
- jd_to_wday
- jd_to_weeknum
- jisx0301 (>= v1_9_1_378)
- _jisx0301 (>= v1_9_1_378)
- json_create (>= v1_9_1_378)
- julian?
- julian_leap?
- ld_to_jd
- leap? (>= v1_9_1_378)
- _load
- mjd_to_jd
- new
- new! (>= v1_9_1_378)
- new_by_frags
- now
- nth_kday (>= v1_9_1_378)
- num_pattern?
- once
- ordinal
- ordinal_to_jd
- parse
- _parse
- _parse_beat (<= v1_8_6_287)
- _parse_day
- _parse_ddd
- _parse_dot
- _parse_eu
- _parse_iso
- _parse_iso2
- _parse_jis
- _parse_mday
- _parse_mon
- _parse_sla
- _parse_sla_eu (<= v1_8_6_287)
- _parse_sla_ja (<= v1_8_6_287)
- _parse_sla_us (<= v1_8_6_287)
- _parse_time
- _parse_us
- _parse_vms
- _parse_year
- rewrite_frags
- rfc2822 (>= v1_9_1_378)
- _rfc2822 (>= v1_9_1_378)
- rfc3339 (>= v1_9_1_378)
- _rfc3339 (>= v1_9_1_378)
- rfc822 (>= v1_9_1_378)
- _rfc822 (>= v1_9_1_378)
- s3e
- strptime
- _strptime
- _strptime_i
- test_all (>= v2_6_3)
- test_civil (>= v2_6_3)
- test_commercial (>= v2_6_3)
- test_nth_kday (>= v2_6_3)
- test_ordinal (>= v2_6_3)
- test_unit_conv (>= v2_6_3)
- test_weeknum (>= v2_6_3)
- time_to_day_fraction
- today
- valid_civil?
- valid_commercial?
- valid_date? (>= v1_9_1_378)
- valid_date_frags?
- valid_jd?
- valid_nth_kday? (>= v1_9_1_378)
- valid_ordinal?
- valid_time?
- valid_time_frags?
- valid_weeknum?
- weeknum
- weeknum_to_jd
- xmlschema (>= v1_9_1_378)
- _xmlschema (>= v1_9_1_378)
- zone_to_diff
- Instance methods (167)
- <<
- <=>
- == (>= v1_9_2_180)
- ===
- >>
- -
- -@ (>= v1_9_2_180)
- / (>= v1_9_2_180)
- * (>= v1_9_2_180)
- ** (>= v1_9_2_180)
- % (>= v1_9_2_180)
- +
- +@ (>= v1_9_2_180)
- abs (>= v1_9_2_180)
- ajd
- ajd_to_amjd (>= v1_9_1_378)
- ajd_to_jd (>= v1_9_1_378)
- amjd
- amjd_to_ajd (>= v1_9_1_378)
- asctime
- as_json (>= v1_9_3_125)
- ceil (>= v1_9_2_180)
- civil
- civil_to_jd (>= v1_9_1_378)
- coerce (>= v1_9_2_180)
- commercial
- commercial_to_jd (>= v1_9_1_378)
- ctime
- cwday
- cweek
- cwyear
- day
- day_fraction
- day_fraction_to_time (>= v1_9_1_378)
- div (>= v1_9_2_180)
- divmod (>= v1_9_2_180)
- downto
- _dump
- dx_addsub (>= v1_9_2_180)
- dx_conv0 (>= v1_9_2_180)
- dx_conv1 (>= v1_9_2_180)
- dx_muldiv (>= v1_9_2_180)
- emit
- emit_a
- emit_ad
- emit_au
- emit_n
- emit_sn
- emit_w
- emit_z
- england
- eql?
- fill (>= v2_6_3)
- find_fdom (>= v1_9_1_378)
- find_fdoy (>= v1_9_1_378)
- find_ldom (>= v1_9_1_378)
- find_ldoy (>= v1_9_1_378)
- fix_style
- floor (>= v1_9_2_180)
- friday? (>= v1_9_3_125)
- gregorian
- gregorian?
- hash
- hour
- httpdate (>= v1_9_1_378)
- initialize_copy (>= v1_9_3_125)
- inspect
- inspect_raw (>= v2_6_3)
- integer? (>= v1_9_2_180)
- iso8601 (>= v1_9_1_378)
- italy
- jd
- jd_to_ajd (>= v1_9_1_378)
- jd_to_civil (>= v1_9_1_378)
- jd_to_commercial (>= v1_9_1_378)
- jd_to_ld (>= v1_9_1_378)
- jd_to_mjd (>= v1_9_1_378)
- jd_to_nth_kday (>= v1_9_1_378)
- jd_to_ordinal (>= v1_9_1_378)
- jd_to_wday (>= v1_9_1_378)
- jd_to_weeknum (>= v1_9_1_378)
- jisx0301 (>= v1_9_1_378)
- julian
- julian?
- ld
- ld_to_jd (>= v1_9_1_378)
- leap?
- marshal_dump (>= v1_9_1_378)
- marshal_dump_old (>= v2_6_3)
- marshal_load (>= v1_9_1_378)
- mday
- min
- minute (>= v1_9_1_378)
- mjd
- mjd_to_jd (>= v1_9_1_378)
- modulo (>= v1_9_2_180)
- mon
- monday? (>= v1_9_3_125)
- month
- new_offset
- new_start
- next
- next_day
- next_month (>= v1_9_1_378)
- next_year (>= v1_9_1_378)
- nth_kday? (>= v1_9_1_378)
- nth_kday_to_jd (>= v1_9_1_378)
- offset
- ordinal
- ordinal_to_jd (>= v1_9_1_378)
- prev_day (>= v1_9_1_378)
- prev_month (>= v1_9_1_378)
- prev_year (>= v1_9_1_378)
- quo (>= v1_9_2_180)
- quotient (>= v1_9_2_180)
- quotrem (>= v1_9_2_180)
- remainder (>= v1_9_2_180)
- rfc2822 (>= v1_9_1_378)
- rfc3339 (>= v1_9_1_378)
- rfc822 (>= v1_9_1_378)
- round (>= v1_9_2_180)
- saturday? (>= v1_9_3_125)
- sec
- sec_fraction
- second (>= v1_9_1_378)
- second_fraction (>= v1_9_1_378)
- start
- step
- strftime
- succ
- sunday? (>= v1_9_3_125)
- thursday? (>= v1_9_3_125)
- time
- time_to_day_fraction (>= v1_9_1_378)
- to_c (>= v1_9_2_180)
- to_date (>= v1_9_1_378)
- to_datetime (>= v1_9_1_378)
- to_f (>= v1_9_2_180)
- to_i (>= v1_9_2_180)
- to_int (>= v1_9_2_180)
- to_json (>= v1_9_1_378)
- to_r (>= v1_9_2_180)
- to_s
- to_time (>= v1_9_1_378)
- to_yaml
- truncate (>= v1_9_2_180)
- tuesday? (>= v1_9_3_125)
- upto
- _valid_civil? (>= v1_9_1_378)
- _valid_commercial? (>= v1_9_1_378)
- _valid_jd? (>= v1_9_1_378)
- _valid_nth_kday? (>= v1_9_1_378)
- _valid_ordinal? (>= v1_9_1_378)
- _valid_time? (>= v1_9_1_378)
- _valid_weeknum? (>= v1_9_1_378)
- wday
- wednesday? (>= v1_9_3_125)
- weeknum0
- weeknum1
- weeknum_to_jd (>= v1_9_1_378)
- wnum0
- wnum1
- xmlschema (>= v1_9_1_378)
- yday
- year
- zone
- zone_to_diff (>= v1_9_1_378)
= private
= protected
julian?(jd, sg)
public
Does a given Julian Day Number fall inside the old-style (Julian) calendar?
jd is the Julian Day Number in question. sg may be Date::GREGORIAN, in which case the answer is false; it may be Date::JULIAN, in which case the answer is true; or it may a number representing the Day of Calendar Reform. Date::ENGLAND and Date::ITALY are two possible such days.
Show source
# File lib/date.rb, line 340 def self.julian? (jd, sg) case sg when Numeric jd < sg else if $VERBOSE warn("#{caller.shift.sub(/:in .*/, '')}: " \ "warning: do not use non-numerical object as julian day number anymore") end not sg end end