Enhanced HTTP_DATE with yyyy_mmm_dd output string.
This commit is contained in:
@@ -114,6 +114,14 @@ feature {NONE} -- Internal
|
|||||||
|
|
||||||
feature -- Conversion to string
|
feature -- Conversion to string
|
||||||
|
|
||||||
|
yyyy_mmm_dd_string: STRING
|
||||||
|
-- String representation YYYY mmm dd
|
||||||
|
-- 2012 Dec 25
|
||||||
|
do
|
||||||
|
create Result.make (11)
|
||||||
|
append_date_time_to_yyyy_mmm_dd_string (date_time, Result)
|
||||||
|
end
|
||||||
|
|
||||||
rfc1123_string: STRING
|
rfc1123_string: STRING
|
||||||
-- String representation following RFC 1123.
|
-- String representation following RFC 1123.
|
||||||
--| Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
|
--| Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
|
||||||
@@ -145,6 +153,15 @@ feature -- Conversion to string
|
|||||||
|
|
||||||
feature -- Conversion into string
|
feature -- Conversion into string
|
||||||
|
|
||||||
|
append_date_time_to_yyyy_mmm_dd_string (dt: DATE_TIME; s: STRING)
|
||||||
|
do
|
||||||
|
s.append_integer (dt.year) -- yyyy
|
||||||
|
s.append_character (' ') -- ' '
|
||||||
|
append_month_mmm_to (dt.month, s) -- mmm
|
||||||
|
s.append_character (' ') -- ' '
|
||||||
|
append_2_digits_integer_to (dt.day, s) -- dd
|
||||||
|
end
|
||||||
|
|
||||||
append_date_time_to_rfc1123_string (dt: DATE_TIME; s: STRING)
|
append_date_time_to_rfc1123_string (dt: DATE_TIME; s: STRING)
|
||||||
do
|
do
|
||||||
append_day_ddd_to (dt.date.day_of_the_week, s) -- ddd
|
append_day_ddd_to (dt.date.day_of_the_week, s) -- ddd
|
||||||
|
|||||||
Reference in New Issue
Block a user