[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7105":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},7105,"Timepiece","naoty\u002FTimepiece","naoty","Intuitive date handling in Swift","",null,"Swift",2609,141,38,7,0,58.46,"MIT License",false,"master",true,[23,24],"date","swift","2026-06-12 04:00:32","# Timepiece  [![CocoaPods Compatible](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FTimepiece.svg)](https:\u002F\u002Fcocoapods.org\u002Fpods\u002FTimepiece) [![Build Status](http:\u002F\u002Fimg.shields.io\u002Ftravis\u002Fnaoty\u002FTimepiece\u002Fmaster.svg?style=flat)](https:\u002F\u002Ftravis-ci.org\u002Fnaoty\u002FTimepiece)\nIntuitive date handling in Swift\n\n## Features\n* :bulb: **Intuitive**: Timepiece provides a set of helpers to make date handling easier.\n* :clock9: **Correct**: Using Foundation API correctly, Timepiece helps to calculate dates correctly without deep understanding.\n* :package: **Small**: Timepiece has only 4 file. You can read the inside of this easily.\n\n## Requirements\n\n* Swift 3.0+\n* iOS 8.0+ \u002F macOS 10.9+ \u002F tvOS 9.0+ \u002F watchOS 2.0+\n\n## Usage\n\n### Initialization\n\n```swift\nDate(era: 235, year: 26, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0, on: Calendar(identifier: .japanese))\nDate(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0)\nDate(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43)\nDate(year: 2014, month: 8, day: 14)\n\nDate.today()\nDate.yesterday()\nDate.tomorrow()\n```\n\n### Calculation\n\n```swift\nnow + 1.year\nnow - 2.months\nnow + (3.weeks - 4.days + 5.hours)\n\n1.year.later\n1.year.ago\n```\n\n### Change\n\n```swift\nnow.changed(year: 2014)\nnow.changed(weekday: 1)\nnow.truncated([.minute, .second, .nanosecond])\nnow.truncated(from: .day)\n```\n\n### Formating\n\n```swift\nnow.stringIn(dateStyle: .long, timeStyle: .medium)\nnow.dateString(in: .medium)\nnow.timeString(in: .short)\n\n3.days.string(in: .full)\n```\n\n### Parsing\n\n```swift\n\"2014\u002F8\u002F14\".date(inFormat: \"yyyy\u002FMM\u002Fdd\")\n\"2014-08-14T20:25:43+0900\".dateInISO8601Format()\n```\n\n## Installation\n\n### CocoaPods\n\n```ruby\n# Podfile\npod \"Timepiece\"\n```\n\n### Carthage\n\n```ruby\n# Cartfile\ngithub \"naoty\u002FTimepiece\"\n```\n\n## Contribution\n\n1. Fork\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\n## License\n\nTimepiece is available under the MIT license. See the LICENSE file for more info.\n\n## Author\n\n[naoty](https:\u002F\u002Fgithub.com\u002Fnaoty)\n\n","Timepiece 是一个用于 Swift 的日期处理库，旨在提供直观简便的日期操作方法。它通过一组辅助函数简化了日期的初始化、计算、格式化和解析等操作，同时确保了使用 Foundation API 时的正确性。项目体积小巧，仅包含四个文件，易于理解和维护。适用于需要高效处理日期时间的应用场景，如日历应用、时间管理工具或任何涉及复杂日期逻辑的 iOS\u002FmacOS\u002FtvOS\u002FwatchOS 应用开发。",2,"2026-06-11 03:10:32","top_language"]