SexyDates 1.0.1

SexyDates 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布最后发布2014年12月

Dominique d'Argent 维护。



SexyDates 1.0.1

  • Dominique d'Argent

SexyDates 是 NSNumber 的一个 Objective-C 类别,允许您以性感、Rails-/ActiveSupport 样式创建日期 (NSDate 对象):@(3).days.ago

安装

手动

SexyDates.hNSNumber+SexyDates.{h,m} 复制到您的项目中。

使用示例

性感版本

@(1).minute.fromNow // In a minute
@(3).days.ago // Three days ago
[@(4).weeks since:@(1).day.fromNow] // Tomorrow in 4 weeks
[@(2).years until:@(1).day.ago] // Yesterday two years ago

长版本

[[@(1) minute] fromNow] // In a minute
[[@(4) weeks] since:[[@(1) day] fromNow]] // Tomorrow in 4 weeks

最长版本

[[[NSNumber numberWithInteger:1] minute] fromNow] // In a minute

您会明白的...

许可协议

SexyDates 在 MIT 许可协议下发布

Copyright (c) <2013> <Dominique d'Argent>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.