Bug #5402
closedEnhancing documentation for Time extension in stlib
Description
As part of Mendicant Universities MRI Documentation Week, I've enhanced the documentation for the Time extension module in stdlib.
Files
Updated by drbrain (Eric Hodel) about 13 years ago
- Target version set to 1.9.4
Since the comment from time.c and time.rb will be combined for ri output the introductory sentence should be reworded. Something like:
When 'time' is required, Time is extended with additional methods for parsing and converting Times
Unqualified method names should be prefixed with # instead of surrounded by ++, qualified names don't need ++ either and classes should not be surrounded with ++. This allows rdoc to link methods and classes to their specific documentation:
The easiest way to create a new time object is to use either #parse¶
#strptime. Each uses Date.__parse and Date.__strptime to create a new instance of Time.¶
For Time.parse, I think an unambiguous date like 2010-10-31 should be used so the month and day position are easy to determine.
The strptime format explanation should be moved to Time.strptime and the list should use :: instead of - as the separator.
Updated by semmons99 (Shane Emmons) about 13 years ago
- File 0001-enhancing-documentation-for-Time-extension-in-stdlib.patch 0001-enhancing-documentation-for-Time-extension-in-stdlib.patch added
I've tried to implement all your suggestions. Here's an updated patch. Let me know if there's anything else you'd like changed.
Updated by drbrain (Eric Hodel) about 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33414.
Shane, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.