Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7164 (closed enhancement: fixed)

Opened 1 year ago

Last modified 5 months ago

[PATCH][DOCS] add docs to Time::Conversions in ActiveSupport

Reported by: rsanheim Assigned to: nzkoz
Priority: normal Milestone: 2.0
Component: ActiveSupport Version: edge
Severity: minor Keywords: docs
Cc: tarmo

Description

Add docs to the Time conversion extensions in ActiveSupport, with some examples of the different format strings that are builtin.

Attachments

docs_for_time_conversions.diff (1.3 kB) - added by rsanheim on 01/18/07 12:21:16.
documentation_for_time_conversions.diff (2.8 kB) - added by jeremymcanally on 11/13/07 04:12:18.
Added some examples for other methods and made patch apply cleanly to edge.
documentation_for_time_conversions.with_alias.diff (3.1 kB) - added by chuyeow on 11/13/07 09:41:21.
Same as jeremymcanally but mentions the #to_s alias and adds :long_ordinal format example
documentation_for_time_conversions.with_alias.r8258.diff (3.1 kB) - added by chuyeow on 12/03/07 01:55:36.
Updated patch against r8258.
documentation_for_time_conversions.with_alias.r8258.2.diff (3.0 kB) - added by chuyeow on 12/04/07 15:36:37.

Change History

01/18/07 12:21:16 changed by rsanheim

  • attachment docs_for_time_conversions.diff added.

08/24/07 16:17:37 changed by tarmo

  • cc set to tarmo.

Nice patch but I think it should also mention that to_formatted_s is alised as to_s which is a bit easier to write.

11/13/07 04:11:44 changed by jeremymcanally

+1 on this with a few fixes that I added.

11/13/07 04:12:18 changed by jeremymcanally

  • attachment documentation_for_time_conversions.diff added.

Added some examples for other methods and made patch apply cleanly to edge.

11/13/07 09:30:27 changed by chuyeow

I agree that it's a good idea to mention the shorter #to_s alias. I added a patch based on jeremy's that removed a stray </tt> and mentions the #to_s alias.

11/13/07 09:41:21 changed by chuyeow

  • attachment documentation_for_time_conversions.with_alias.diff added.

Same as jeremymcanally but mentions the #to_s alias and adds :long_ordinal format example

12/02/07 08:42:12 changed by nzkoz

  • owner changed from core to nzkoz.
  • status changed from new to assigned.
  • milestone changed from 1.2.6 to 2.0.

Looks good guys, if you can make it apply to trunk I'll apply it

12/03/07 01:55:36 changed by chuyeow

  • attachment documentation_for_time_conversions.with_alias.r8258.diff added.

Updated patch against r8258.

12/03/07 01:56:22 changed by chuyeow

Updated it against HEAD. Thanks Koz.

12/04/07 15:04:07 changed by gbuesing

Nice stuff. One small issue: the example for #to_s(:time) isn't accurate -- it should just show HH:MM.

12/04/07 15:36:37 changed by chuyeow

  • attachment documentation_for_time_conversions.with_alias.r8258.2.diff added.

12/04/07 15:39:53 changed by chuyeow

You're absolutely right. Apologies for not verifying that in the initial patch!

12/05/07 05:58:23 changed by nzkoz

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [8278]) Enhance documentation for Active Support's Time Conversion functions. [rsanheim, jeremymcanally, chuyeow] Closes #7164

12/05/07 06:11:54 changed by chuyeow

I made a similar patch for Date Conversions: #10368. Please take a look. Thanks!