Last active
December 24, 2015 16:59
-
-
Save vipulnsward/6832302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = NSDateFormatter.alloc.init # Date Formatter | |
df.dateFormat = "yyyy-MM-dd" | |
Product.new("iPhone 5", 199, df.dateFromString("2012-09-21")).price | |
products = [Product.new("iPhone 5", 199, df.dateFromString("2012-09-21")),Product.new("iPad Mini", 329, df.dateFromString("2012-11-02")),Product.new("MacBook Pro",1699, df.dateFromString("2012-06-11")),Product.new("iMac", 1299, df.dateFromString("2012-11-02"))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment