0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Format numbers and dates according to The New York Times Manual of Style
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

nytimes-style¶ ↑

Helper methods for generating text that conforms to The New York Times Manual of Style and Usage.

Annotated source code: ascheink.github.com/nytimes-style

INSTALLATION¶ ↑

gem install nytimes-style

USAGE¶ ↑

require 'nytimes-style'
include Nytimes::Style

>> nytimes_date Date.today
# => "May 12, 2011"

>> nytimes_date Date.today, :hide_current_year => true, :day_of_week => true
# => "Wednesday, June 15"

>> nytimes_time Time.now, :hide_abbreviation => false
# => "2:30 p.m."

>> nytimes_state_abbrev 'AZ'
# => "Ariz."  

>> nytimes_state_name '55'
# => "Wisconsin"

CONTRIBUTORS¶ ↑

Andrei Scheinkman, andreischeinkman@gmail.com

Tyson Evans, tyson.evans@nytimes.com

Derek Willis, dwillis@nytimes.com