Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
/ nytimes-style Public archive

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

Notifications You must be signed in to change notification settings

ascheink/nytimes-style

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, [email protected]

Tyson Evans, [email protected]

Derek Willis, [email protected]

About

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

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •