Showing preview only (1,085K chars total). Download the full file or copy to clipboard to get everything.
Repository: MatthewYork/DateTools
Branch: master
Commit: 5550567233ee
Files: 221
Total size: 1011.1 KB
Directory structure:
gitextract_pjza5tl6/
├── .gitignore
├── .swift-version
├── .travis.yml
├── CREDITS.md
├── DateTools/
│ ├── DateTools/
│ │ ├── DTConstants.h
│ │ ├── DTConstants.m
│ │ ├── DTError.h
│ │ ├── DTError.m
│ │ ├── DTTimePeriod.h
│ │ ├── DTTimePeriod.m
│ │ ├── DTTimePeriodChain.h
│ │ ├── DTTimePeriodChain.m
│ │ ├── DTTimePeriodCollection.h
│ │ ├── DTTimePeriodCollection.m
│ │ ├── DTTimePeriodGroup.h
│ │ ├── DTTimePeriodGroup.m
│ │ ├── DateTools.bundle/
│ │ │ ├── am.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ar.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── bg.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ca.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── cs.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── cy.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── da.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── de.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── en.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── es.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── eu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── fi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── fr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── gre.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── gu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── he.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── id.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── is.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── it.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ja.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ko.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── lv.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ms.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── nb.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── nl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pt-PT.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pt.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ro.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ru.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── sk.lproj/
│ │ │ │ └── NSDateTimeAgo.strings
│ │ │ ├── sl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── sv.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── th.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── tr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── uk.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── vi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── zh-Hans.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ └── zh-Hant.lproj/
│ │ │ └── DateTools.strings
│ │ ├── DateTools.h
│ │ ├── NSDate+DateTools.h
│ │ └── NSDate+DateTools.m
│ ├── Examples/
│ │ └── DateToolsExample/
│ │ ├── DateTools/
│ │ │ └── Info.plist
│ │ ├── DateTools macOS/
│ │ │ ├── DateTools macOS.h
│ │ │ └── Info.plist
│ │ ├── DateToolsExample/
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Colours.h
│ │ │ ├── Colours.m
│ │ │ ├── DateToolsExample-Info.plist
│ │ │ ├── DateToolsExample-Prefix.pch
│ │ │ ├── DateToolsViewController.h
│ │ │ ├── DateToolsViewController.m
│ │ │ ├── DateToolsViewController.xib
│ │ │ ├── ExampleNavigationController.h
│ │ │ ├── ExampleNavigationController.m
│ │ │ ├── Images.xcassets/
│ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchImage.launchimage/
│ │ │ │ └── Contents.json
│ │ │ ├── TimePeriodsViewController.h
│ │ │ ├── TimePeriodsViewController.m
│ │ │ ├── TimePeriodsViewController.xib
│ │ │ ├── en.lproj/
│ │ │ │ └── InfoPlist.strings
│ │ │ └── main.m
│ │ ├── DateToolsExample.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace/
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── xcschemes/
│ │ │ ├── DateTools macOS.xcscheme
│ │ │ └── DateTools.xcscheme
│ │ └── DateToolsExampleTests/
│ │ ├── DateToolsExampleTests-Info.plist
│ │ └── en.lproj/
│ │ └── InfoPlist.strings
│ └── Tests/
│ └── DateToolsTests/
│ ├── DateToolsTests/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ └── Main.storyboard
│ │ ├── DateToolsTests-Info.plist
│ │ ├── DateToolsTests-Prefix.pch
│ │ ├── Images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ ├── es.lproj/
│ │ │ ├── InfoPlist.strings
│ │ │ └── Main.strings
│ │ ├── ja.lproj/
│ │ │ ├── InfoPlist.strings
│ │ │ └── Main.strings
│ │ └── main.m
│ ├── DateToolsTests.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ ├── DateToolsTests.xcscheme
│ │ └── DateToolsTestsTests.xcscheme
│ └── DateToolsTestsTests/
│ ├── DTTimeAgoTests.m
│ ├── DTTimePeriodChainTests.m
│ ├── DTTimePeriodCollectionTests.m
│ ├── DTTimePeriodGroupTests.m
│ ├── DTTimePeriodTests.m
│ ├── DateToolsTests.m
│ ├── DateToolsTestsTests-Info.plist
│ ├── en.lproj/
│ │ └── InfoPlist.strings
│ ├── es.lproj/
│ │ └── InfoPlist.strings
│ └── ja.lproj/
│ └── InfoPlist.strings
├── DateTools.podspec
├── DateToolsSwift/
│ ├── DateTools/
│ │ ├── Constants.swift
│ │ ├── Date+Bundle.swift
│ │ ├── Date+Comparators.swift
│ │ ├── Date+Components.swift
│ │ ├── Date+Format.swift
│ │ ├── Date+Inits.swift
│ │ ├── Date+Manipulations.swift
│ │ ├── Date+TimeAgo.swift
│ │ ├── DateTools.bundle/
│ │ │ ├── am.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ar.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── bg.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ca.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── cs.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── cy.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── da.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── de.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── en.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── es.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── eu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── fi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── fr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── gre.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── gu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── he.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── hu.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── id.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── is.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── it.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ja.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ko.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── lv.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ms.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── nb.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── nl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pt-PT.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── pt.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ro.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── ru.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── sk.lproj/
│ │ │ │ └── NSDateTimeAgo.strings
│ │ │ ├── sl.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── sv.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── th.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── tr.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── uk.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── vi.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ ├── zh-Hans.lproj/
│ │ │ │ └── DateTools.strings
│ │ │ └── zh-Hant.lproj/
│ │ │ └── DateTools.strings
│ │ ├── Enums.swift
│ │ ├── Integer+DateTools.swift
│ │ ├── TimeChunk.swift
│ │ ├── TimePeriod.swift
│ │ ├── TimePeriodChain.swift
│ │ ├── TimePeriodCollection.swift
│ │ └── TimePeriodGroup.swift
│ ├── Examples/
│ │ └── DateToolsExample/
│ │ ├── DateToolsExample/
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets/
│ │ │ │ ├── AppIcon.appiconset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── first.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── second.imageset/
│ │ │ │ └── Contents.json
│ │ │ ├── Base.lproj/
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ │ ├── ExtensionsViewController.swift
│ │ │ ├── Info.plist
│ │ │ └── TimePeriodsViewController.swift
│ │ ├── DateToolsExample.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ ├── DateToolsExampleTests/
│ │ │ ├── DateToolsExampleTests.swift
│ │ │ └── Info.plist
│ │ └── DateToolsExampleUITests/
│ │ ├── DateToolsExampleUITests.swift
│ │ └── Info.plist
│ ├── Tests/
│ │ └── DateToolsTests/
│ │ ├── DateToolsTests/
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets/
│ │ │ │ └── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Base.lproj/
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── ViewController.swift
│ │ ├── DateToolsTests.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── DateToolsTestsTests/
│ │ ├── DateComparatorsExtensionTests.swift
│ │ ├── DateComponentsExtensionTests.swift
│ │ ├── DateFormatExtensionTests.swift
│ │ ├── DateInitsExtensionTests.swift
│ │ ├── DateManipulationsExtensionTests.swift
│ │ ├── DateTimeAgoExtensionTests.swift
│ │ ├── Info.plist
│ │ ├── IntegerExtensionTests.swift
│ │ ├── TimeAgoTests.swift
│ │ ├── TimeChunkTests.swift
│ │ ├── TimePeriodChainTests.swift
│ │ ├── TimePeriodCollection.swift
│ │ ├── TimePeriodCollectionTests.swift
│ │ ├── TimePeriodGroupTests.swift
│ │ └── TimePeriodTests.swift
│ └── doc_gen.sh
├── DateToolsSwift.podspec
├── Examples/
│ └── DateToolsExample/
│ ├── DateTools macOS/
│ │ ├── DateTools macOS.h
│ │ └── Info.plist
│ └── DateToolsExample.xcodeproj/
│ └── xcshareddata/
│ └── xcschemes/
│ └── DateTools macOS.xcscheme
├── LICENSE
├── Package.swift
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
.build/
#CocoaPods
Pods
================================================
FILE: .swift-version
================================================
5.0
================================================
FILE: .travis.yml
================================================
language: swift
before_script:
- gem install xcpretty
script:
- xcodebuild -project Tests/DateToolsTests/DateToolsTests.xcodeproj -scheme DateToolsTests -sdk iphonesimulator test | xcpretty -c
================================================
FILE: CREDITS.md
================================================
Credits
=======
Portions from NSDate+TimeAgo Originally based on code Christopher Pickslay posted to Forrst. Used with permission. http://twitter.com/cpickslay
Ramon Torres began support for internationalization/localization. Added es strings. http://rtorres.me/
Dennis Zhuang added zh_Hans Chinese Simplified strings. http://fnil.net/
Mozart Petter added pt_BR Brazilian Portuguese strings. http://www.mozartpetter.com/
Stéphane Gerardot added fr French strings.
Marco Sanson added it Italian strings. http://marcosanson.tumblr.com/
Almas Adilbek added ru Russian strings. Extended logic to support Russian idioms. http://mixdesign.kz/
Mallox51 added de German strings. https://github.com/Mallox51
Tieme van Veen added nl Dutch strings. http://www.tiemevanveen.nl
Árpád Goretity added hu Hungarian strings. http://apaczai.elte.hu/~13akga/
Anajavi added fi Finnish strings. https://github.com/anajavi
Tonydyb added ja Japanese strings.
Vinhnx added vi Vietnamese strings. http://vinhnx.github.io/
Ronail added zh_Hant Traditional Chinese strings. https://github.com/ronail
SorinAntohi added ro Romanian strings. https://github.com/SorinAntohi
spookd added da Danish strings. https://github.com/spookd
Barrett Jacobsen added cs Czech strings. https://github.com/barrettj
Dmitry Shmidt added nb Norwegian strings. https://github.com/shmidt
Martins Rudens added lv Latvian strings. https://github.com/rudensm
Osman Saral added tr Turkish strings. https://github.com/osrl
analogstyle added ko Korean strings. http://almacreative.net/
Flavio Caetano fixed pt Portuguese strings. http://flaviocaetano.com
kolarski added bg Bulgarian strings. http://github.com/kolarski
Vladimir Kofman added he Hebrew strings. https://github.com/vladimirkofman
Viraf Sarkari added ar Arabic, gre Greek, pl Polish, sv Swedish, and th Thai strings. https://github.com/viraf
Vasyl Skrypii added uk Ukranian strings. https://github.com/medlay
Maggi Trymbill added is Icelandic strings. https://github.com/grundvollur
Ikhsan Assaat added id Indonesian strings. http://ikhsan.me
Marc added ca Catalan strings. http://marcboquet.com/
Steffan Harries added cy Welsh strings. https://github.com/Bendihossan
mjanda added es and cs short format strings https://github.com/mjanda
Niklas Fahl added the de short format strings https://github.com/fahlout
Vlad Cacuic added the ro short format strings https://github.com/vrcaciuc
frin added sl Slovenian strings. http://github.com/frin
Nikhil Nigade added hi (Hindi) and gu (Gujarati) strings. https://github.com/dezinezync
Faiz Mokhtar added ms Malay strings. https://github.com/faizmokhtar
Jakub Olejník (https://github.com/olejnjak) and Jakub Truhlář (https://github.com/kubatru) added sk (Slovak) strings
================================================
FILE: DateTools/DateTools/DTConstants.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT const long long SECONDS_IN_YEAR;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_MONTH_28;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_MONTH_29;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_MONTH_30;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_MONTH_31;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_WEEK;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_DAY;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_HOUR;
FOUNDATION_EXPORT const NSInteger SECONDS_IN_MINUTE;
FOUNDATION_EXPORT const NSInteger MILLISECONDS_IN_DAY;
#import "DTError.h"
================================================
FILE: DateTools/DateTools/DTConstants.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTConstants.h"
const long long SECONDS_IN_YEAR = 31556900;
const NSInteger SECONDS_IN_MONTH_28 = 2419200;
const NSInteger SECONDS_IN_MONTH_29 = 2505600;
const NSInteger SECONDS_IN_MONTH_30 = 2592000;
const NSInteger SECONDS_IN_MONTH_31 = 2678400;
const NSInteger SECONDS_IN_WEEK = 604800;
const NSInteger SECONDS_IN_DAY = 86400;
const NSInteger SECONDS_IN_HOUR = 3600;
const NSInteger SECONDS_IN_MINUTE = 60;
const NSInteger MILLISECONDS_IN_DAY = 86400000;
================================================
FILE: DateTools/DateTools/DTError.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
#pragma mark - Domain
extern NSString *const DTErrorDomain;
#pragma mark - Status Codes
static const NSUInteger DTInsertOutOfBoundsException = 0;
static const NSUInteger DTRemoveOutOfBoundsException = 1;
static const NSUInteger DTBadTypeException = 2;
@interface DTError : NSObject
+(void)throwInsertOutOfBoundsException:(NSInteger)index array:(NSArray *)array;
+(void)throwRemoveOutOfBoundsException:(NSInteger)index array:(NSArray *)array;
+(void)throwBadTypeException:(id)obj expectedClass:(Class)classType;
@end
================================================
FILE: DateTools/DateTools/DTError.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTError.h"
#pragma mark - Domain
NSString *const DTErrorDomain = @"com.mattyork.dateTools";
@implementation DTError
+(void)throwInsertOutOfBoundsException:(NSInteger)index array:(NSArray *)array{
//Handle possible zero bounds
NSInteger arrayUpperBound = (array.count == 0)? 0:array.count;
//Create info for error
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: NSLocalizedString(@"Operation was unsuccessful.", nil), NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Attempted to insert DTTimePeriod at index %ld but the group is of size [0...%ld].", (long)index, (long)arrayUpperBound],NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Please try an index within the bounds or the group.", nil)};
//Handle Error
NSError *error = [NSError errorWithDomain:DTErrorDomain code:DTInsertOutOfBoundsException userInfo:userInfo];
[self printErrorWithCallStack:error];
}
+(void)throwRemoveOutOfBoundsException:(NSInteger)index array:(NSArray *)array{
//Handle possible zero bounds
NSInteger arrayUpperBound = (array.count == 0)? 0:array.count;
//Create info for error
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: NSLocalizedString(@"Operation was unsuccessful.", nil), NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Attempted to remove DTTimePeriod at index %ld but the group is of size [0...%ld].", (long)index, (long)arrayUpperBound],NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Please try an index within the bounds of the group.", nil)};
//Handle Error
NSError *error = [NSError errorWithDomain:DTErrorDomain code:DTRemoveOutOfBoundsException userInfo:userInfo];
[self printErrorWithCallStack:error];
}
+(void)throwBadTypeException:(id)obj expectedClass:(Class)classType{
//Create info for error
NSDictionary *userInfo = @{NSLocalizedDescriptionKey: NSLocalizedString(@"Operation was unsuccessful.", nil), NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Attempted to insert object of class %@ when expecting object of class %@.", NSStringFromClass([obj class]), NSStringFromClass(classType)],NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Please try again by inserting a DTTimePeriod object.", nil)};
//Handle Error
NSError *error = [NSError errorWithDomain:DTErrorDomain code:DTBadTypeException userInfo:userInfo];
[self printErrorWithCallStack:error];
}
+(void)printErrorWithCallStack:(NSError *)error{
//Print error
NSLog(@"%@", error);
//Print call stack
for (NSString *symbol in [NSThread callStackSymbols]) {
NSLog(@"\n\n %@", symbol);
}
}
@end
================================================
FILE: DateTools/DateTools/DTTimePeriod.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, DTTimePeriodRelation){
DTTimePeriodRelationAfter,
DTTimePeriodRelationStartTouching,
DTTimePeriodRelationStartInside,
DTTimePeriodRelationInsideStartTouching,
DTTimePeriodRelationEnclosingStartTouching,
DTTimePeriodRelationEnclosing,
DTTimePeriodRelationEnclosingEndTouching,
DTTimePeriodRelationExactMatch,
DTTimePeriodRelationInside,
DTTimePeriodRelationInsideEndTouching,
DTTimePeriodRelationEndInside,
DTTimePeriodRelationEndTouching,
DTTimePeriodRelationBefore,
DTTimePeriodRelationNone //One or more of the dates does not exist
};
typedef NS_ENUM(NSUInteger, DTTimePeriodSize) {
DTTimePeriodSizeSecond,
DTTimePeriodSizeMinute,
DTTimePeriodSizeHour,
DTTimePeriodSizeDay,
DTTimePeriodSizeWeek,
DTTimePeriodSizeMonth,
DTTimePeriodSizeYear
};
typedef NS_ENUM(NSUInteger, DTTimePeriodInterval) {
DTTimePeriodIntervalOpen,
DTTimePeriodIntervalClosed
};
typedef NS_ENUM(NSUInteger, DTTimePeriodAnchor) {
DTTimePeriodAnchorStart,
DTTimePeriodAnchorCenter,
DTTimePeriodAnchorEnd
};
@interface DTTimePeriod : NSObject
/**
* The start date for a DTTimePeriod representing the starting boundary of the time period
*/
@property (nonatomic,strong) NSDate *StartDate;
/**
* The end date for a DTTimePeriod representing the ending boundary of the time period
*/
@property (nonatomic,strong) NSDate *EndDate;
#pragma mark - Custom Init / Factory Methods
-(instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate;
+(instancetype)timePeriodWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate;
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size startingAt:(NSDate *)date;
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount startingAt:(NSDate *)date;
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size endingAt:(NSDate *)date;
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount endingAt:(NSDate *)date;
+(instancetype)timePeriodWithAllTime;
#pragma mark - Time Period Information
-(BOOL)hasStartDate;
-(BOOL)hasEndDate;
-(BOOL)isMoment;
-(double)durationInYears;
-(double)durationInWeeks;
-(double)durationInDays;
-(double)durationInHours;
-(double)durationInMinutes;
-(double)durationInSeconds;
#pragma mark - Time Period Relationship
-(BOOL)isEqualToPeriod:(DTTimePeriod *)period;
-(BOOL)isInside:(DTTimePeriod *)period;
-(BOOL)contains:(DTTimePeriod *)period;
-(BOOL)overlapsWith:(DTTimePeriod *)period;
-(BOOL)intersects:(DTTimePeriod *)period;
-(DTTimePeriodRelation)relationToPeriod:(DTTimePeriod *)period;
-(NSTimeInterval)gapBetween:(DTTimePeriod *)period;
#pragma mark - Date Relationships
-(BOOL)containsDate:(NSDate *)date interval:(DTTimePeriodInterval)interval;
#pragma mark - Period Manipulation
#pragma mark Shifts
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size;
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount;
-(void)shiftLaterWithSize:(DTTimePeriodSize)size;
-(void)shiftLaterWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount;
#pragma mark Lengthen / Shorten
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size;
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount;
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size;
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount;
#pragma mark - Helper Methods
-(DTTimePeriod *)copy;
@end
================================================
FILE: DateTools/DateTools/DTTimePeriod.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTTimePeriod.h"
#import "NSDate+DateTools.h"
@interface DTTimePeriod ()
@end
@implementation DTTimePeriod
#pragma mark - Custom Init / Factory Methods
/**
* Initializes an instance of DTTimePeriod from a given start and end date
*
* @param startDate NSDate - Desired start date
* @param endDate NSDate - Desired end date
*
* @return DTTimePeriod - new instance
*/
-(instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate{
if (self = [super init]) {
self.StartDate = startDate;
self.EndDate = endDate;
}
return self;
}
/**
* Returns a new instance of DTTimePeriod from a given start and end date
*
* @param startDate NSDate - Desired start date
* @param endDate NSDate - Desired end date
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate{
return [[self.class alloc] initWithStartDate:startDate endDate:endDate];
}
/**
* Returns a new instance of DTTimePeriod that starts on the provided start date
* and is of the size provided
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param date NSDate - Desired start date of the new time period
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size startingAt:(NSDate *)date{
return [[self.class alloc] initWithStartDate:date endDate:[DTTimePeriod dateWithAddedTime:size amount:1 baseDate:date]];
}
/**
* Returns a new instance of DTTimePeriod that starts on the provided start date
* and is of the size provided. The amount represents a multipler to the size (e.g. "2 weeks" or "4 years")
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param amount NSInteger - Desired multiplier of the size provided
* @param date NSDate - Desired start date of the new time period
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount startingAt:(NSDate *)date{
return [[self.class alloc] initWithStartDate:date endDate:[DTTimePeriod dateWithAddedTime:size amount:amount baseDate:date]];
}
/**
* Returns a new instance of DTTimePeriod that ends on the provided end date
* and is of the size provided
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param date NSDate - Desired end date of the new time period
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size endingAt:(NSDate *)date{
return [[self.class alloc] initWithStartDate:[DTTimePeriod dateWithSubtractedTime:size amount:1 baseDate:date] endDate:date];
}
/**
* Returns a new instance of DTTimePeriod that ends on the provided end date
* and is of the size provided. The amount represents a multipler to the size (e.g. "2 weeks" or "4 years")
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param amount NSInteger - Desired multiplier of the size provided
* @param date NSDate - Desired end date of the new time period
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount endingAt:(NSDate *)date{
return [[self.class alloc] initWithStartDate:[DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:date] endDate:date];
}
/**
* Returns a new instance of DTTimePeriod that represents the largest time period available.
* The start date is in the distant past and the end date is in the distant future.
*
* @return DTTimePeriod - new instance
*/
+(instancetype)timePeriodWithAllTime{
return [[self.class alloc] initWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture]];
}
/**
* Method serving the various factory methods as well as a few others.
* Returns a date with time added to a given base date. Includes multiplier amount.
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param amount NSInteger - Desired multiplier of the size provided
* @param date NSDate - Desired end date of the new time period
*
* @return NSDate - new instance
*/
+(NSDate *)dateWithAddedTime:(DTTimePeriodSize)size amount:(NSInteger)amount baseDate:(NSDate *)date{
switch (size) {
case DTTimePeriodSizeSecond:
return [date dateByAddingSeconds:amount];
break;
case DTTimePeriodSizeMinute:
return [date dateByAddingMinutes:amount];
break;
case DTTimePeriodSizeHour:
return [date dateByAddingHours:amount];
break;
case DTTimePeriodSizeDay:
return [date dateByAddingDays:amount];
break;
case DTTimePeriodSizeWeek:
return [date dateByAddingWeeks:amount];
break;
case DTTimePeriodSizeMonth:
return [date dateByAddingMonths:amount];
break;
case DTTimePeriodSizeYear:
return [date dateByAddingYears:amount];
break;
default:
break;
}
return date;
}
/**
* Method serving the various factory methods as well as a few others.
* Returns a date with time subtracted from a given base date. Includes multiplier amount.
*
* @param size DTTimePeriodSize - Desired size of the new time period
* @param amount NSInteger - Desired multiplier of the size provided
* @param date NSDate - Desired end date of the new time period
*
* @return NSDate - new instance
*/
+(NSDate *)dateWithSubtractedTime:(DTTimePeriodSize)size amount:(NSInteger)amount baseDate:(NSDate *)date{
switch (size) {
case DTTimePeriodSizeSecond:
return [date dateBySubtractingSeconds:amount];
break;
case DTTimePeriodSizeMinute:
return [date dateBySubtractingMinutes:amount];
break;
case DTTimePeriodSizeHour:
return [date dateBySubtractingHours:amount];
break;
case DTTimePeriodSizeDay:
return [date dateBySubtractingDays:amount];
break;
case DTTimePeriodSizeWeek:
return [date dateBySubtractingWeeks:amount];
break;
case DTTimePeriodSizeMonth:
return [date dateBySubtractingMonths:amount];
break;
case DTTimePeriodSizeYear:
return [date dateBySubtractingYears:amount];
break;
default:
break;
}
return date;
}
#pragma mark - Time Period Information
/**
* Returns a boolean representing whether the receiver's StartDate exists
* Returns YES if StartDate is not nil, otherwise NO
*
* @return BOOL
*/
-(BOOL)hasStartDate {
return (self.StartDate)? YES:NO;
}
/**
* Returns a boolean representing whether the receiver's EndDate exists
* Returns YES if EndDate is not nil, otherwise NO
*
* @return BOOL
*/
-(BOOL)hasEndDate {
return (self.EndDate)? YES:NO;
}
/**
* Returns a boolean representing whether the receiver is a "moment", that is the start and end dates are the same.
* Returns YES if receiver is a moment, otherwise NO
*
* @return BOOL
*/
-(BOOL)isMoment{
if (self.StartDate && self.EndDate) {
if ([self.StartDate isEqualToDate:self.EndDate]) {
return YES;
}
}
return NO;
}
/**
* Returns the duration of the receiver in years
*
* @return NSInteger
*/
-(double)durationInYears {
if (self.StartDate && self.EndDate) {
return [self.StartDate yearsEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in weeks
*
* @return double
*/
-(double)durationInWeeks {
if (self.StartDate && self.EndDate) {
return [self.StartDate weeksEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in days
*
* @return double
*/
-(double)durationInDays {
if (self.StartDate && self.EndDate) {
return [self.StartDate daysEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in hours
*
* @return double
*/
-(double)durationInHours {
if (self.StartDate && self.EndDate) {
return [self.StartDate hoursEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in minutes
*
* @return double
*/
-(double)durationInMinutes {
if (self.StartDate && self.EndDate) {
return [self.StartDate minutesEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in seconds
*
* @return double
*/
-(double)durationInSeconds {
if (self.StartDate && self.EndDate) {
return [self.StartDate secondsEarlierThan:self.EndDate];
}
return 0;
}
#pragma mark - Time Period Relationship
/**
* Returns a BOOL representing whether the receiver's start and end dates exatcly match a given time period
* Returns YES if the two periods are the same, otherwise NO
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return BOOL
*/
-(BOOL)isEqualToPeriod:(DTTimePeriod *)period{
if ([self.StartDate isEqualToDate:period.StartDate] && [self.EndDate isEqualToDate:period.EndDate]) {
return YES;
}
return NO;
}
/**
* Returns a BOOL representing whether the receiver's start and end dates exatcly match a given time period or is contained within them
* Returns YES if the receiver is inside the given time period, otherwise NO
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return BOOL
*/
-(BOOL)isInside:(DTTimePeriod *)period{
if ([period.StartDate isEarlierThanOrEqualTo:self.StartDate] && [period.EndDate isLaterThanOrEqualTo:self.EndDate]) {
return YES;
}
return NO;
}
/**
* Returns a BOOL representing whether the given time period's start and end dates exatcly match the receivers' or is contained within them
* Returns YES if the receiver is inside the given time period, otherwise NO
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return BOOL
*/
-(BOOL)contains:(DTTimePeriod *)period{
if ([self.StartDate isEarlierThanOrEqualTo:period.StartDate] && [self.EndDate isLaterThanOrEqualTo:period.EndDate]) {
return YES;
}
return NO;
}
/**
* Returns a BOOL representing whether the receiver and the given time period overlap.
* This covers all space they share, minus instantaneous space (i.e. one's start date equals another's end date)
* Returns YES if they overlap, otherwise NO
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return BOOL
*/
-(BOOL)overlapsWith:(DTTimePeriod *)period{
//Outside -> Inside
if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThan:self.StartDate]) {
return YES;
}
//Enclosing
else if ([period.StartDate isLaterThanOrEqualTo:self.StartDate] && [period.EndDate isEarlierThanOrEqualTo:self.EndDate]){
return YES;
}
//Inside -> Out
else if([period.StartDate isEarlierThan:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
return YES;
}
return NO;
}
/**
* Returns a BOOL representing whether the receiver and the given time period overlap.
* This covers all space they share, including instantaneous space (i.e. one's start date equals another's end date)
* Returns YES if they overlap, otherwise NO
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return BOOL
*/
-(BOOL)intersects:(DTTimePeriod *)period{
//Outside -> Inside
if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThanOrEqualTo:self.StartDate]) {
return YES;
}
//Enclosing
else if ([period.StartDate isLaterThanOrEqualTo:self.StartDate] && [period.EndDate isEarlierThanOrEqualTo:self.EndDate]){
return YES;
}
//Inside -> Out
else if([period.StartDate isEarlierThanOrEqualTo:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
return YES;
}
return NO;
}
/**
* Returns the relationship of the receiver to a given time period
*
* @param period DTTimePeriod - Time period to compare to receiver
*
* @return DTTimePeriodRelation
*/
-(DTTimePeriodRelation)relationToPeriod:(DTTimePeriod *)period{
//Make sure that all start and end points exist for comparison
if (self.StartDate && self.EndDate && period.StartDate && period.EndDate) {
//Make sure time periods are of positive durations
if ([self.StartDate isEarlierThan:self.EndDate] && [period.StartDate isEarlierThan:period.EndDate]) {
//Make comparisons
if ([period.EndDate isEarlierThan:self.StartDate]) {
return DTTimePeriodRelationAfter;
}
else if ([period.EndDate isEqualToDate:self.StartDate]){
return DTTimePeriodRelationStartTouching;
}
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
return DTTimePeriodRelationStartInside;
}
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isLaterThan:self.EndDate]){
return DTTimePeriodRelationInsideStartTouching;
}
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
return DTTimePeriodRelationEnclosingStartTouching;
}
else if ([period.StartDate isLaterThan:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
return DTTimePeriodRelationEnclosing;
}
else if ([period.StartDate isLaterThan:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
return DTTimePeriodRelationEnclosingEndTouching;
}
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
return DTTimePeriodRelationExactMatch;
}
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThan:self.EndDate]){
return DTTimePeriodRelationInside;
}
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
return DTTimePeriodRelationInsideEndTouching;
}
else if ([period.StartDate isEarlierThan:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
return DTTimePeriodRelationEndInside;
}
else if ([period.StartDate isEqualToDate:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
return DTTimePeriodRelationEndTouching;
}
else if ([period.StartDate isLaterThan:self.EndDate]){
return DTTimePeriodRelationBefore;
}
}
}
return DTTimePeriodRelationNone;
}
/**
* Returns the gap in seconds between the receiver and provided time period
* Returns 0 if the time periods intersect, otherwise returns the gap between.
*
* @param period <#period description#>
*
* @return <#return value description#>
*/
-(NSTimeInterval)gapBetween:(DTTimePeriod *)period{
if ([self.EndDate isEarlierThan:period.StartDate]) {
return ABS([self.EndDate timeIntervalSinceDate:period.StartDate]);
}
else if ([period.EndDate isEarlierThan:self.StartDate]){
return ABS([period.EndDate timeIntervalSinceDate:self.StartDate]);
}
return 0;
}
#pragma mark - Date Relationships
/**
* Returns a BOOL representing whether the provided date is contained in the receiver.
*
* @param date NSDate - Date to evaluate
* @param interval DTTimePeriodInterval representing evaluation type (Closed includes StartDate and EndDate in evaluation, Open does not)
*
* @return <#return value description#>
*/
-(BOOL)containsDate:(NSDate *)date interval:(DTTimePeriodInterval)interval{
if (interval == DTTimePeriodIntervalOpen) {
if ([self.StartDate isEarlierThan:date] && [self.EndDate isLaterThan:date]) {
return YES;
}
else {
return NO;
}
}
else if (interval == DTTimePeriodIntervalClosed){
if ([self.StartDate isEarlierThanOrEqualTo:date] && [self.EndDate isLaterThanOrEqualTo:date]) {
return YES;
}
else {
return NO;
}
}
return NO;
}
#pragma mark - Period Manipulation
/**
* Shifts the StartDate and EndDate earlier by a given size amount
*
* @param size DTTimePeriodSize - Desired shift size
*/
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size{
[self shiftEarlierWithSize:size amount:1];
}
/**
* Shifts the StartDate and EndDate earlier by a given size amount. Amount multiplies size.
*
* @param size DTTimePeriodSize - Desired shift size
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
*/
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.StartDate];
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.EndDate];
}
/**
* Shifts the StartDate and EndDate later by a given size amount
*
* @param size DTTimePeriodSize - Desired shift size
*/
-(void)shiftLaterWithSize:(DTTimePeriodSize)size{
[self shiftLaterWithSize:size amount:1];
}
/**
* Shifts the StartDate and EndDate later by a given size amount. Amount multiplies size.
*
* @param size DTTimePeriodSize - Desired shift size
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
*/
-(void)shiftLaterWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.StartDate];
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.EndDate];
}
#pragma mark Lengthen / Shorten
/**
* Lengthens the receiver by a given amount, anchored by a provided point
*
* @param anchor DTTimePeriodAnchor - Anchor point for the lengthen (the date that stays the same)
* @param size DTTimePeriodSize - Desired lenghtening size
*/
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size{
[self lengthenWithAnchorDate:anchor size:size amount:1];
}
/**
* Lengthens the receiver by a given amount, anchored by a provided point. Amount multiplies size.
*
* @param anchor DTTimePeriodAnchor - Anchor point for the lengthen (the date that stays the same)
* @param size DTTimePeriodSize - Desired lenghtening size
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
*/
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount{
switch (anchor) {
case DTTimePeriodAnchorStart:
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.EndDate];
break;
case DTTimePeriodAnchorCenter:
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount/2 baseDate:self.StartDate];
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount/2 baseDate:self.EndDate];
break;
case DTTimePeriodAnchorEnd:
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.StartDate];
break;
default:
break;
}
}
/**
* Shortens the receiver by a given amount, anchored by a provided point
*
* @param anchor DTTimePeriodAnchor - Anchor point for the shorten (the date that stays the same)
* @param size DTTimePeriodSize - Desired shortening size
*/
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size{
[self shortenWithAnchorDate:anchor size:size amount:1];
}
/**
* Shortens the receiver by a given amount, anchored by a provided point. Amount multiplies size.
*
* @param anchor DTTimePeriodAnchor - Anchor point for the shorten (the date that stays the same)
* @param size DTTimePeriodSize - Desired shortening size
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
*/
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount{
switch (anchor) {
case DTTimePeriodAnchorStart:
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.EndDate];
break;
case DTTimePeriodAnchorCenter:
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount/2 baseDate:self.StartDate];
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount/2 baseDate:self.EndDate];
break;
case DTTimePeriodAnchorEnd:
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.StartDate];
break;
default:
break;
}
}
#pragma mark - Helper Methods
-(DTTimePeriod *)copy{
DTTimePeriod *period = [DTTimePeriod timePeriodWithStartDate:[NSDate dateWithTimeIntervalSince1970:self.StartDate.timeIntervalSince1970] endDate:[NSDate dateWithTimeIntervalSince1970:self.EndDate.timeIntervalSince1970]];
return period;
}
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodChain.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
#import "DTTimePeriodGroup.h"
@interface DTTimePeriodChain : DTTimePeriodGroup {
DTTimePeriod *First;
DTTimePeriod *Last;
}
@property (nonatomic, readonly) DTTimePeriod *First;
@property (nonatomic, readonly) DTTimePeriod *Last;
#pragma mark - Custom Init / Factory Chain
+(DTTimePeriodChain *)chain;
#pragma mark - Chain Existence Manipulation
-(void)addTimePeriod:(DTTimePeriod *)period;
-(void)insertTimePeriod:(DTTimePeriod *)period atInedx:(NSInteger)index;
-(void)removeTimePeriodAtIndex:(NSInteger)index;
-(void)removeLatestTimePeriod;
-(void)removeEarliestTimePeriod;
#pragma mark - Chain Relationship
-(BOOL)isEqualToChain:(DTTimePeriodChain *)chain;
#pragma mark - Updates
-(void)updateVariables;
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodChain.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTTimePeriodChain.h"
#import "DTError.h"
@interface DTTimePeriodChain ()
@end
@implementation DTTimePeriodChain
#pragma mark - Custom Init / Factory Chain
+(DTTimePeriodChain *)chain{
return [[DTTimePeriodChain alloc] init];
}
#pragma mark - Chain Existence Manipulation
-(void)addTimePeriod:(DTTimePeriod *)period{
if ([period class] != [DTTimePeriod class]) {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
return;
}
if (periods) {
if (periods.count > 0) {
//Create a modified period to be added based on size of passed in period
DTTimePeriod *modifiedPeriod = [DTTimePeriod timePeriodWithSize:DTTimePeriodSizeSecond amount:period.durationInSeconds startingAt:[periods[periods.count - 1] EndDate]];
//Add object to periods array
[periods addObject:modifiedPeriod];
}
else {
//Add object to periods array
[periods addObject:period];
}
}
else {
//Create new periods array
periods = [NSMutableArray array];
//Add object to periods array
[periods addObject:period];
}
//Set object's variables with updated array values
[self updateVariables];
}
-(void)insertTimePeriod:(DTTimePeriod *)period atInedx:(NSInteger)index{
if ([period class] != [DTTimePeriod class]) {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
return;
}
//Make sure the index is within the operable bounds of the periods array
if (index == 0) {
//Update bounds of period to make it fit in chain
DTTimePeriod *modifiedPeriod = [DTTimePeriod timePeriodWithSize:DTTimePeriodSizeSecond amount:period.durationInSeconds endingAt:[periods[0] EndDate]];
//Insert the updated object at the beginning of the periods array
[periods insertObject:modifiedPeriod atIndex:0];
}
else if (index > 0 && index < periods.count) {
//Shift time periods later if they fall after new period
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
//Shift later
if (idx >= index) {
[((DTTimePeriod *) obj) shiftLaterWithSize:DTTimePeriodSizeSecond amount:period.durationInSeconds];
}
}];
//Update bounds of period to make it fit in chain
DTTimePeriod *modifiedPeriod = [DTTimePeriod timePeriodWithSize:DTTimePeriodSizeSecond amount:period.durationInSeconds startingAt:[periods[index - 1] EndDate]];
//Insert the updated object at the beginning of the periods array
[periods insertObject:modifiedPeriod atIndex:index];
//Set object's variables with updated array values
[self updateVariables];
}
else {
[DTError throwInsertOutOfBoundsException:index array:periods];
}
}
-(void)removeTimePeriodAtIndex:(NSInteger)index{
//Make sure the index is within the operable bounds of the periods array
if (index >= 0 && index < periods.count) {
DTTimePeriod *period = periods[index];
//Shift time periods later if they fall after new period
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
//Shift earlier
if (idx > index) {
[((DTTimePeriod *) obj) shiftEarlierWithSize:DTTimePeriodSizeSecond amount:period.durationInSeconds];
}
}];
//Remove object
[periods removeObjectAtIndex:index];
//Set object's variables with updated array values
[self updateVariables];
}
else {
[DTError throwRemoveOutOfBoundsException:index array:periods];
}
}
-(void)removeLatestTimePeriod{
if (periods.count > 0) {
[periods removeLastObject];
//Update the object variables
if (periods.count > 0) {
//Set object's variables with updated array values
[self updateVariables];
}
else {
[self setVariablesNil];
}
}
}
-(void)removeEarliestTimePeriod{
if (periods > 0) {
//Shift time periods earlier
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
//Shift earlier to account for removal of first element in periods array
[((DTTimePeriod *) obj) shiftEarlierWithSize:DTTimePeriodSizeSecond amount:[periods[0] durationInSeconds]];
}];
//Remove first period
[periods removeObjectAtIndex:0];
//Update the object variables
if (periods.count > 0) {
//Set object's variables with updated array values
[self updateVariables];
}
else {
[self setVariablesNil];
}
}
}
#pragma mark - Chain Relationship
-(BOOL)isEqualToChain:(DTTimePeriodChain *)chain{
//Check class
if ([chain class] != [DTTimePeriodChain class]) {
[DTError throwBadTypeException:chain expectedClass:[DTTimePeriodChain class]];
return NO;
}
//Check group level characteristics for speed
if (![self hasSameCharacteristicsAs:chain]) {
return NO;
}
//Check whole chain
__block BOOL isEqual = YES;
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if (![chain[idx] isEqualToPeriod:obj]) {
isEqual = NO;
*stop = YES;
}
}];
return isEqual;
}
#pragma mark - Getters
-(DTTimePeriod *)First{
return First;
}
-(DTTimePeriod *)Last{
return Last;
}
#pragma mark - Helper Methods
-(void)updateVariables{
//Set helper variables
StartDate = [periods[0] StartDate];
EndDate = [periods[periods.count - 1] EndDate];
First = periods[0];
Last = periods[periods.count -1];
}
-(void)setVariablesNil{
//Set helper variables
StartDate = nil;
EndDate = nil;
First = nil;
Last = nil;
}
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodCollection.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
#import "DTTimePeriodGroup.h"
@interface DTTimePeriodCollection : DTTimePeriodGroup
#pragma mark - Custom Init / Factory Methods
+(DTTimePeriodCollection *)collection;
#pragma mark - Collection Manipulation
-(void)addTimePeriod:(DTTimePeriod *)period;
-(void)insertTimePeriod:(DTTimePeriod *)period atIndex:(NSInteger)index;
-(void)removeTimePeriodAtIndex:(NSInteger)index;
#pragma mark - Sorting
-(void)sortByStartAscending;
-(void)sortByStartDescending;
-(void)sortByEndAscending;
-(void)sortByEndDescending;
-(void)sortByDurationAscending;
-(void)sortByDurationDescending;
#pragma mark - Collection Relationship
-(DTTimePeriodCollection *)periodsInside:(DTTimePeriod *)period;
-(DTTimePeriodCollection *)periodsIntersectedByDate:(NSDate *)date;
-(DTTimePeriodCollection *)periodsIntersectedByPeriod:(DTTimePeriod *)period;
-(DTTimePeriodCollection *)periodsOverlappedByPeriod:(DTTimePeriod *)period;
-(BOOL)isEqualToCollection:(DTTimePeriodCollection *)collection considerOrder:(BOOL)considerOrder;
#pragma mark - Helper Methods
-(DTTimePeriodCollection *)copy;
#pragma mark - Updates
-(void)updateVariables;
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodCollection.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTTimePeriodCollection.h"
#import "DTError.h"
#import "NSDate+DateTools.h"
@implementation DTTimePeriodCollection
#pragma mark - Custom Init / Factory Methods
/**
* Initializes a new instance of DTTimePeriodCollection
*
* @return DTTimePeriodCollection
*/
+(DTTimePeriodCollection *)collection{
return [[DTTimePeriodCollection alloc] init];
}
#pragma mark - Collection Manipulation
/**
* Adds a time period to the reciever.
*
* @param period DTTimePeriod - The time period to add to the collection
*/
-(void)addTimePeriod:(DTTimePeriod *)period{
if ([period isKindOfClass:[DTTimePeriod class]]) {
[periods addObject:period];
//Set object's variables with updated array values
[self updateVariables];
}
else {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
}
}
/**
* Inserts a time period to the receiver at a given index.
*
* @param period DTTimePeriod - The time period to insert into the collection
* @param index NSInteger - The index in the collection the time period is to be added at
*/
-(void)insertTimePeriod:(DTTimePeriod *)period atIndex:(NSInteger)index{
if ([period class] != [DTTimePeriod class]) {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
return;
}
if (index >= 0 && index < periods.count) {
[periods insertObject:period atIndex:index];
//Set object's variables with updated array values
[self updateVariables];
}
else {
[DTError throwInsertOutOfBoundsException:index array:periods];
}
}
/**
* Removes the time period at a given index from the collection
*
* @param index NSInteger - The index in the collection the time period is to be removed from
*/
-(void)removeTimePeriodAtIndex:(NSInteger)index{
if (index >= 0 && index < periods.count) {
[periods removeObjectAtIndex:index];
//Update the object variables
if (periods.count > 0) {
//Set object's variables with updated array values
[self updateVariables];
}
else {
[self setVariablesNil];
}
}
else {
[DTError throwRemoveOutOfBoundsException:index array:periods];
}
}
#pragma mark - Sorting
/**
* Sorts the time periods in the collection by earliest start date to latest start date.
*/
-(void)sortByStartAscending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
return [((DTTimePeriod *) obj1).StartDate compare:((DTTimePeriod *) obj2).StartDate];
}];
}
/**
* Sorts the time periods in the collection by latest start date to earliest start date.
*/
-(void)sortByStartDescending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
return [((DTTimePeriod *) obj2).StartDate compare:((DTTimePeriod *) obj1).StartDate];
}];
}
/**
* Sorts the time periods in the collection by earliest end date to latest end date.
*/
-(void)sortByEndAscending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
return [((DTTimePeriod *) obj1).EndDate compare:((DTTimePeriod *) obj2).EndDate];
}];
}
/**
* Sorts the time periods in the collection by latest end date to earliest end date.
*/
-(void)sortByEndDescending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
return [((DTTimePeriod *) obj2).EndDate compare:((DTTimePeriod *) obj1).EndDate];
}];
}
/**
* Sorts the time periods in the collection by how much time they span. Sorts smallest durations to longest.
*/
-(void)sortByDurationAscending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
if (((DTTimePeriod *) obj1).durationInSeconds < ((DTTimePeriod *) obj2).durationInSeconds) {
return NSOrderedAscending;
}
else {
return NSOrderedDescending;
}
return NSOrderedSame;
}];
}
/**
* Sorts the time periods in the collection by how much time they span. Sorts longest durations to smallest.
*/
-(void)sortByDurationDescending{
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
if (((DTTimePeriod *) obj1).durationInSeconds > ((DTTimePeriod *) obj2).durationInSeconds) {
return NSOrderedAscending;
}
else {
return NSOrderedDescending;
}
return NSOrderedSame;
}];
}
#pragma mark - Collection Relationship
/**
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that fall inside a given time period.
* Time periods of the receiver must have a start date and end date within the closed interval of the period provided to be included.
*
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
*
* @return DTTimePeriodCollection
*/
-(DTTimePeriodCollection *)periodsInside:(DTTimePeriod *)period{
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
if ([period isKindOfClass:[DTTimePeriod class]]) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([((DTTimePeriod *) obj) isInside:period]) {
[collection addTimePeriod:obj];
}
}];
}
else {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
}
return collection;
}
/**
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that intersect a given date.
* Time periods of the receiver must have a start date earlier than or equal to the comparison date and an end date later than or equal to the comparison date to be included
*
* @param date NSDate - The date to check against the receiver's time periods
*
* @return DTTimePeriodCollection
*/
-(DTTimePeriodCollection *)periodsIntersectedByDate:(NSDate *)date{
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
if ([date isKindOfClass:[NSDate class]]) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([((DTTimePeriod *) obj) containsDate:date interval:DTTimePeriodIntervalClosed]) {
[collection addTimePeriod:obj];
}
}];
}
else {
[DTError throwBadTypeException:date expectedClass:[NSDate class]];
}
return collection;
}
/**
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that intersect a given time period.
* Intersection with the given time period includes other time periods that simply touch it. (i.e. one's start date is equal to another's end date)
*
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
*
* @return DTTimePeriodCollection
*/
-(DTTimePeriodCollection *)periodsIntersectedByPeriod:(DTTimePeriod *)period{
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
if ([period isKindOfClass:[DTTimePeriod class]]) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([((DTTimePeriod *) obj) intersects:period]) {
[collection addTimePeriod:obj];
}
}];
}
else {
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
}
return collection;
}
/**
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that overlap a given time period.
* Overlap with the given time period does NOT include other time periods that simply touch it. (i.e. one's start date is equal to another's end date)
*
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
*
* @return DTTimePeriodCollection
*/
-(DTTimePeriodCollection *)periodsOverlappedByPeriod:(DTTimePeriod *)period{
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([((DTTimePeriod *) obj) overlapsWith:period]) {
[collection addTimePeriod:obj];
}
}];
return collection;
}
/**
* Returns a BOOL representing whether the receiver is equal to a given DTTimePeriodCollection. Equality requires the start and end dates to be the same, and all time periods to be the same.
*
* If you would like to take the order of the time periods in two collections into consideration, you may do so with the considerOrder BOOL
*
* @param collection DTTimePeriodCollection - The collection to compare with the receiver
* @param considerOrder BOOL - Option for whether to account for the time periods order in the test for equality. YES considers order, NO does not.
*
* @return BOOL
*/
-(BOOL)isEqualToCollection:(DTTimePeriodCollection *)collection considerOrder:(BOOL)considerOrder{
//Check class
if ([collection class] != [DTTimePeriodCollection class]) {
[DTError throwBadTypeException:collection expectedClass:[DTTimePeriodCollection class]];
return NO;
}
//Check group level characteristics for speed
if (![self hasSameCharacteristicsAs:collection]) {
return NO;
}
//Default to equality and look for inequality
__block BOOL isEqual = YES;
if (considerOrder) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if (![collection[idx] isEqualToPeriod:obj]) {
isEqual = NO;
*stop = YES;
}
}];
}
else {
__block DTTimePeriodCollection *collectionCopy = [collection copy];
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
__block BOOL innerMatch = NO;
__block NSInteger matchIndex = 0; //We will remove matches to account for duplicates and to help speed
for (int ii = 0; ii < collectionCopy.count; ii++) {
if ([obj isEqualToPeriod:collectionCopy[ii]]) {
innerMatch = YES;
matchIndex = ii;
break;
}
}
//If there was a match found, stop
if (!innerMatch) {
isEqual = NO;
*stop = YES;
}
else {
[collectionCopy removeTimePeriodAtIndex:matchIndex];
}
}];
}
return isEqual;
}
#pragma mark - Helper Methods
-(void)updateVariables{
//Set helper variables
__block NSDate *startDate = [NSDate distantFuture];
__block NSDate *endDate = [NSDate distantPast];
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([((DTTimePeriod *) obj).StartDate isEarlierThan:startDate]) {
startDate = ((DTTimePeriod *) obj).StartDate;
}
if ([((DTTimePeriod *) obj).EndDate isLaterThan:endDate]) {
endDate = ((DTTimePeriod *) obj).EndDate;
}
}];
//Make assignments after evaluation
StartDate = startDate;
EndDate = endDate;
}
-(void)setVariablesNil{
//Set helper variables
StartDate = nil;
EndDate = nil;
}
/**
* Returns a new instance of DTTimePeriodCollection that is an exact copy of the receiver, but with differnt memory references, etc.
*
* @return DTTimePeriodCollection
*/
-(DTTimePeriodCollection *)copy{
DTTimePeriodCollection *collection = [DTTimePeriodCollection collection];
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[collection addTimePeriod:[obj copy]];
}];
return collection;
}
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodGroup.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import <Foundation/Foundation.h>
#import "DTTimePeriod.h"
@interface DTTimePeriodGroup : NSObject {
@protected
NSMutableArray *periods;
NSDate *StartDate;
NSDate *EndDate;
}
@property (nonatomic, readonly) NSDate *StartDate;
@property (nonatomic, readonly) NSDate *EndDate;
//Here we will use object subscripting to help create the illusion of an array
- (id)objectAtIndexedSubscript:(NSUInteger)index; //getter
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)index; //setter
#pragma mark - Group Info
-(double)durationInYears;
-(double)durationInWeeks;
-(double)durationInDays;
-(double)durationInHours;
-(double)durationInMinutes;
-(double)durationInSeconds;
-(NSDate *)StartDate;
-(NSDate *)EndDate;
-(NSInteger)count;
#pragma mark - Chain Time Manipulation
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size;
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount;
-(void)shiftLaterWithSize:(DTTimePeriodSize)size;
-(void)shiftLaterWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount;
#pragma mark - Comparison
-(BOOL)hasSameCharacteristicsAs:(DTTimePeriodGroup *)group;
#pragma mark - Updates
-(void)updateVariables;
@end
================================================
FILE: DateTools/DateTools/DTTimePeriodGroup.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTTimePeriodGroup.h"
#import "NSDate+DateTools.h"
@interface DTTimePeriodGroup ()
@end
@implementation DTTimePeriodGroup
-(id) init
{
if (self = [super init]) {
periods = [[NSMutableArray alloc] init];
}
return self;
}
- (id)objectAtIndexedSubscript:(NSUInteger)index
{
return periods[index];
}
- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)index {
periods[index] = obj;
}
#pragma mark - Group Info
/**
* Returns the duration of the receiver in years
*
* @return NSInteger
*/
-(double)durationInYears {
if (self.StartDate && self.EndDate) {
return [self.StartDate yearsEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in weeks
*
* @return double
*/
-(double)durationInWeeks {
if (self.StartDate && self.EndDate) {
return [self.StartDate weeksEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in days
*
* @return double
*/
-(double)durationInDays {
if (self.StartDate && self.EndDate) {
return [self.StartDate daysEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in hours
*
* @return double
*/
-(double)durationInHours {
if (self.StartDate && self.EndDate) {
return [self.StartDate hoursEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in minutes
*
* @return double
*/
-(double)durationInMinutes {
if (self.StartDate && self.EndDate) {
return [self.StartDate minutesEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the duration of the receiver in seconds
*
* @return double
*/
-(double)durationInSeconds {
if (self.StartDate && self.EndDate) {
return [self.StartDate secondsEarlierThan:self.EndDate];
}
return 0;
}
/**
* Returns the NSDate representing the earliest date in the DTTimePeriodGroup (or subclass)
*
* @return NSDate
*/
-(NSDate *)StartDate{
return StartDate;
}
/**
* Returns the NSDate representing the latest date in the DTTimePeriodGroup (or subclass)
*
* @return NSDate
*/
-(NSDate *)EndDate{
return EndDate;
}
/**
* The total number of DTTimePeriods in the group
*
* @return NSInteger
*/
-(NSInteger)count{
return periods.count;
}
/**
* Returns a BOOL if the receiver and the comparison group have the same metadata (i.e. number of periods, start & end date, etc.)
* Returns YES if they share the same characteristics, otherwise NO
*
* @param group The group to compare with the receiver
*
* @return BOOL
*/
-(BOOL)hasSameCharacteristicsAs:(DTTimePeriodGroup *)group{
//Check characteristics first for speed
if (group.count != self.count) {
return NO;
}
else if (!group.StartDate && !group.EndDate && !self.StartDate && !self.EndDate){
return YES;
}
else if (![group.StartDate isEqualToDate:self.StartDate] || ![group.EndDate isEqualToDate:self.EndDate]){
return NO;
}
return YES;
}
#pragma mark - Chain Time Manipulation
/**
* Shifts all the time periods in the collection to an earlier date by the given size
*
* @param size DTTimePeriodSize - The desired size of the shift
*/
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size{
[self shiftEarlierWithSize:size amount:1];
}
/**
* Shifts all the time periods in the collection to an earlier date by the given size and amount.
* The amount acts as a multiplier to the size (i.e. "2 weeks" or "4 years")
*
* @param size DTTimePeriodSize - The desired size of the shift
* @param amount NSInteger - Multiplier for the size
*/
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
if (periods) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[((DTTimePeriod *)obj) shiftEarlierWithSize:size amount:amount];
}];
[self updateVariables];
}
}
/**
* Shifts all the time periods in the collection to a later date by the given size
*
* @param size DTTimePeriodSize - The desired size of the shift
*/
-(void)shiftLaterWithSize:(DTTimePeriodSize)size{
[self shiftLaterWithSize:size amount:1];
}
/**
* Shifts all the time periods in the collection to an later date by the given size and amount.
* The amount acts as a multiplier to the size (i.e. "2 weeks" or "4 years")
*
* @param size DTTimePeriodSize - The desired size of the shift
* @param amount NSInteger - Multiplier for the size
*/
-(void)shiftLaterWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
if (periods) {
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[((DTTimePeriod *)obj) shiftLaterWithSize:size amount:amount];
}];
[self updateVariables];
}
}
#pragma mark - Updates
-(void)updateVariables{}
@end
================================================
FILE: DateTools/DateTools/DateTools.bundle/am.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d ቀናት በፊት";
/* No comment provided by engineer. */
"%d hours ago" = "%d ሰዓታት በፊት";
/* No comment provided by engineer. */
"%d minutes ago" = "%d ደቂቃዎች በፊት";
/* No comment provided by engineer. */
"%d months ago" = "%d ወሮች በፊት";
/* No comment provided by engineer. */
"%d seconds ago" = "%d ሰከንዶች በፊት";
/* No comment provided by engineer. */
"%d weeks ago" = "%d ሳምንታት በፊት";
/* No comment provided by engineer. */
"%d years ago" = "%d አመታት በፊት";
/* No comment provided by engineer. */
"A minute ago" = "አንድ ደቂቃ በፊት";
/* No comment provided by engineer. */
"An hour ago" = "አንድ ሰዓት በፊት";
/* No comment provided by engineer. */
"Just now" = "ልክ አሁን";
/* No comment provided by engineer. */
"Last month" = "ያለፈው ወር";
/* No comment provided by engineer. */
"Last week" = "ያለፈው ሳምንት";
/* No comment provided by engineer. */
"Last year" = "ያለፈው አመት";
/* No comment provided by engineer. */
"Yesterday" = "ትናንትና";
/* No comment provided by engineer. */
"1 year ago" = "አንድ አመት በፊት";
/* No comment provided by engineer. */
"1 month ago" = "አንድ ወር በፊት";
/* No comment provided by engineer. */
"1 week ago" = "አንድ ሳምንት በፊት";
/* No comment provided by engineer. */
"1 day ago" = "አንድ ቀን በፊት";
/* No comment provided by engineer. */
"1 hour ago" = "አንድ ሰዓት በፊት";
/* No comment provided by engineer. */
"1 minute ago" = "አንድ ደቂቃ በፊት";
/* No comment provided by engineer. */
"1 second ago" = "አንድ ሰከንድ በፊት";
/* No comment provided by engineer. */
"This morning" = "ዛሬ ጠዋት";
/* No comment provided by engineer. */
"This afternoon" = "ዛሬ ከሰዓት";
/* No comment provided by engineer. */
"Today" = "ዛሬ";
/* No comment provided by engineer. */
"This week" = "በዚህ ሳምንት";
/* No comment provided by engineer. */
"This month" = "በዚህ ወር";
/* No comment provided by engineer. */
"This year" = "በዚህ አመት";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%dM"; // month
"%dw" = "%dw"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/bg.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "преди %d дена";
/* No comment provided by engineer. */
"%d hours ago" = "преди %d часа";
/* No comment provided by engineer. */
"%d minutes ago" = "преди %d минути";
/* No comment provided by engineer. */
"%d months ago" = "преди %d месеца";
/* No comment provided by engineer. */
"%d seconds ago" = "преди %d секунди";
/* No comment provided by engineer. */
"%d weeks ago" = "преди %d седмици";
/* No comment provided by engineer. */
"%d years ago" = "преди %d години";
/* No comment provided by engineer. */
"A minute ago" = "преди минута";
/* No comment provided by engineer. */
"An hour ago" = "преди час";
/* No comment provided by engineer. */
"Just now" = "току що";
/* No comment provided by engineer. */
"Last month" = "през последния месец";
/* No comment provided by engineer. */
"Last week" = "през последната седмица";
/* No comment provided by engineer. */
"Last year" = "през последната година";
/* No comment provided by engineer. */
"Yesterday" = "вчера";
/* No comment provided by engineer. */
"1 year ago" = "преди 1 година";
/* No comment provided by engineer. */
"1 month ago" = "преди 1 месец";
/* No comment provided by engineer. */
"1 week ago" = "преди 1 седмица";
/* No comment provided by engineer. */
"1 day ago" = "преди 1 ден";
/* No comment provided by engineer. */
"This morning" = "тази сутрин";
/* No comment provided by engineer. */
"This afternoon" = "тази вечер";
/* No comment provided by engineer. */
"Today" = "днес";
/* No comment provided by engineer. */
"This week" = "тази седмица";
/* No comment provided by engineer. */
"This month" = "този месец";
/* No comment provided by engineer. */
"This year" = "тази година";
================================================
FILE: DateTools/DateTools/DateTools.bundle/ca.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Fa %d dies";
/* No comment provided by engineer. */
"%d hours ago" = "Fa %d hores";
/* No comment provided by engineer. */
"%d minutes ago" = "Fa %d minuts";
/* No comment provided by engineer. */
"%d months ago" = "Fa %d mesos";
/* No comment provided by engineer. */
"%d seconds ago" = "Fa %d segons";
/* No comment provided by engineer. */
"%d weeks ago" = "Fa %d setmanes";
/* No comment provided by engineer. */
"%d years ago" = "Fa %d anys";
/* No comment provided by engineer. */
"A minute ago" = "Fa un minut";
/* No comment provided by engineer. */
"An hour ago" = "Fa una hora";
/* No comment provided by engineer. */
"Just now" = "Fa un moment";
/* No comment provided by engineer. */
"Last month" = "El mes passat";
/* No comment provided by engineer. */
"Last week" = "La setmana passada";
/* No comment provided by engineer. */
"Last year" = "L'any passat";
/* No comment provided by engineer. */
"Yesterday" = "Ahir";
/* No comment provided by engineer. */
"1 year ago" = "Fa un any";
/* No comment provided by engineer. */
"1 month ago" = "Fa un mes";
/* No comment provided by engineer. */
"1 week ago" = "Fa una setmana";
/* No comment provided by engineer. */
"1 day ago" = "Fa un dia";
/* No comment provided by engineer. */
"This morning" = "Aquest matí";
/* No comment provided by engineer. */
"This afternoon" = "Aquesta tarda";
/* No comment provided by engineer. */
"Today" = "Avui";
/* No comment provided by engineer. */
"This week" = "Aquesta setmana";
/* No comment provided by engineer. */
"This month" = "Aquest mes";
/* No comment provided by engineer. */
"This year" = "Aquest any";
================================================
FILE: DateTools/DateTools/DateTools.bundle/cs.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Před %d dny";
/* No comment provided by engineer. */
"%d hours ago" = "Před %d hodinami";
/* No comment provided by engineer. */
"%d minutes ago" = "Před %d minutami";
/* No comment provided by engineer. */
"%d months ago" = "Před %d měsíci";
/* No comment provided by engineer. */
"%d seconds ago" = "Před %d sekundami";
/* No comment provided by engineer. */
"%d weeks ago" = "Před %d týdny";
/* No comment provided by engineer. */
"%d years ago" = "Před %d lety";
/* No comment provided by engineer. */
"A minute ago" = "Před minutou";
/* No comment provided by engineer. */
"An hour ago" = "Před hodinou";
/* No comment provided by engineer. */
"Just now" = "Právě teď";
/* No comment provided by engineer. */
"Last month" = "Minulý měsíc";
/* No comment provided by engineer. */
"Last week" = "Minulý týden";
/* No comment provided by engineer. */
"Last year" = "Minulý rok";
/* No comment provided by engineer. */
"Yesterday" = "Včera";
/* No comment provided by engineer. */
"1 year ago" = "Před rokem";
/* No comment provided by engineer. */
"1 month ago" = "Před měsícem";
/* No comment provided by engineer. */
"1 week ago" = "Před týdnem";
/* No comment provided by engineer. */
"1 day ago" = "Předevčírem";
/* No comment provided by engineer. */
"This morning" = "Dnes dopoledne";
/* No comment provided by engineer. */
"This afternoon" = "Dnes odpoledne";
/* No comment provided by engineer. */
"Today" = "Dnes";
/* No comment provided by engineer. */
"This week" = "Tento týden";
/* No comment provided by engineer. */
"This month" = "Tento měsíc";
/* No comment provided by engineer. */
"This year" = "Letos";
/* Short format for */
"%dy" = "%dr"; // year
"%dM" = "%dM"; // month
"%dw" = "%dt"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/cy.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d diwrnod yn ôl";
/* No comment provided by engineer. */
"%d hours ago" = "%d awr yn ôl";
/* No comment provided by engineer. */
"%d minutes ago" = "%d munud yn ôl";
/* No comment provided by engineer. */
"%d months ago" = "%d mis yn ôl";
/* No comment provided by engineer. */
"%d seconds ago" = "%d eiliad yn ôl";
/* No comment provided by engineer. */
"%d weeks ago" = "%d wythnos yn ôl";
/* No comment provided by engineer. */
"%d years ago" = "%d mlynydd yn ôl";
/* No comment provided by engineer. */
"A minute ago" = "Un munud yn ôl";
/* No comment provided by engineer. */
"An hour ago" = "Un awr yn ôl";
/* No comment provided by engineer. */
"Just now" = "Nawr";
/* No comment provided by engineer. */
"Last month" = "Mis diwethaf";
/* No comment provided by engineer. */
"Last week" = "Wythnos diwethaf";
/* No comment provided by engineer. */
"Last year" = "Llynedd";
/* No comment provided by engineer. */
"Yesterday" = "Ddoe";
/* No comment provided by engineer. */
"1 year ago" = "1 flynydd yn ôl";
/* No comment provided by engineer. */
"1 month ago" = "1 mis yn ôl";
/* No comment provided by engineer. */
"1 week ago" = "1 wythnos yn ôl";
/* No comment provided by engineer. */
"1 day ago" = "1 diwrnod yn ôl";
/* No comment provided by engineer. */
"This morning" = "Y bore ma";
/* No comment provided by engineer. */
"This afternoon" = "Y penwythnos hon";
/* No comment provided by engineer. */
"Today" = "Heddiw";
/* No comment provided by engineer. */
"This week" = "Yr wythnos hon";
/* No comment provided by engineer. */
"This month" = "Y mis hon";
/* No comment provided by engineer. */
"This year" = "Eleni";
================================================
FILE: DateTools/DateTools/DateTools.bundle/da.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dage siden";
/* No comment provided by engineer. */
"%d hours ago" = "%d timer siden";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minutter siden";
/* No comment provided by engineer. */
"%d months ago" = "%d måneder siden";
/* No comment provided by engineer. */
"%d seconds ago" = "%d sekunder siden";
/* No comment provided by engineer. */
"%d weeks ago" = "%d uger siden";
/* No comment provided by engineer. */
"%d years ago" = "%d år siden";
/* No comment provided by engineer. */
"A minute ago" = "Et minut siden";
/* No comment provided by engineer. */
"An hour ago" = "En time siden";
/* No comment provided by engineer. */
"Just now" = "Lige nu";
/* No comment provided by engineer. */
"Last month" = "Sidste måned";
/* No comment provided by engineer. */
"Last week" = "Sidste uge";
/* No comment provided by engineer. */
"Last year" = "Sidste år";
/* No comment provided by engineer. */
"Yesterday" = "I går";
/* No comment provided by engineer. */
"1 year ago" = "1 år siden";
/* No comment provided by engineer. */
"1 month ago" = "1 måned siden";
/* No comment provided by engineer. */
"1 week ago" = "1 uge siden";
/* No comment provided by engineer. */
"1 day ago" = "1 dag siden";
/* No comment provided by engineer. */
"This morning" = "Her til morgen";
/* No comment provided by engineer. */
"This afternoon" = "Her til eftermiddag";
/* No comment provided by engineer. */
"Today" = "I dag";
/* No comment provided by engineer. */
"This week" = "Denne uge";
/* No comment provided by engineer. */
"This month" = "Denne måned";
/* No comment provided by engineer. */
"This year" = "Dette år";
================================================
FILE: DateTools/DateTools/DateTools.bundle/de.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Vor %d Tagen";
/* No comment provided by engineer. */
"%d hours ago" = "Vor %d Stunden";
/* No comment provided by engineer. */
"%d minutes ago" = "Vor %d Minuten";
/* No comment provided by engineer. */
"%d months ago" = "Vor %d Monaten";
/* No comment provided by engineer. */
"%d seconds ago" = "Vor %d Sekunden";
/* No comment provided by engineer. */
"%d weeks ago" = "Vor %d Wochen";
/* No comment provided by engineer. */
"%d years ago" = "Vor %d Jahren";
/* No comment provided by engineer. */
"A minute ago" = "Vor einer Minute";
/* No comment provided by engineer. */
"An hour ago" = "Vor einer Stunde";
/* No comment provided by engineer. */
"Just now" = "Gerade eben";
/* No comment provided by engineer. */
"Last month" = "Letzten Monat";
/* No comment provided by engineer. */
"Last week" = "Letzte Woche";
/* No comment provided by engineer. */
"Last year" = "Letztes Jahr";
/* No comment provided by engineer. */
"Yesterday" = "Gestern";
/* No comment provided by engineer. */
"1 year ago" = "Vor 1 Jahr";
/* No comment provided by engineer. */
"1 month ago" = "Vor 1 Monat";
/* No comment provided by engineer. */
"1 week ago" = "Vor 1 Woche";
/* No comment provided by engineer. */
"1 day ago" = "Vor 1 Tag";
/* No comment provided by engineer. */
"This morning" = "Heute Morgen";
/* No comment provided by engineer. */
"This afternoon" = "Heute Nachmittag";
/* No comment provided by engineer. */
"Today" = "Heute";
/* No comment provided by engineer. */
"This week" = "Diese Woche";
/* No comment provided by engineer. */
"This month" = "Diesen Monat";
/* No comment provided by engineer. */
"This year" = "Dieses Jahr";
/* Short format for */
"%dy" = "%dJ"; // year
"%dM" = "%dM"; // month
"%dw" = "%dW"; // week
"%dd" = "%dT"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/en.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d days ago";
/* No comment provided by engineer. */
"%d hours ago" = "%d hours ago";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minutes ago";
/* No comment provided by engineer. */
"%d months ago" = "%d months ago";
/* No comment provided by engineer. */
"%d seconds ago" = "%d seconds ago";
/* No comment provided by engineer. */
"%d weeks ago" = "%d weeks ago";
/* No comment provided by engineer. */
"%d years ago" = "%d years ago";
/* No comment provided by engineer. */
"A minute ago" = "A minute ago";
/* No comment provided by engineer. */
"An hour ago" = "An hour ago";
/* No comment provided by engineer. */
"Just now" = "Just now";
/* No comment provided by engineer. */
"Last month" = "Last month";
/* No comment provided by engineer. */
"Last week" = "Last week";
/* No comment provided by engineer. */
"Last year" = "Last year";
/* No comment provided by engineer. */
"Yesterday" = "Yesterday";
/* No comment provided by engineer. */
"1 year ago" = "1 year ago";
/* No comment provided by engineer. */
"1 month ago" = "1 month ago";
/* No comment provided by engineer. */
"1 week ago" = "1 week ago";
/* No comment provided by engineer. */
"1 day ago" = "1 day ago";
/* No comment provided by engineer. */
"1 hour ago" = "1 hour ago";
/* No comment provided by engineer. */
"1 minute ago" = "1 minute ago";
/* No comment provided by engineer. */
"1 second ago" = "1 second ago";
/* No comment provided by engineer. */
"This morning" = "This morning";
/* No comment provided by engineer. */
"This afternoon" = "This afternoon";
/* No comment provided by engineer. */
"Today" = "Today";
/* No comment provided by engineer. */
"This week" = "This week";
/* No comment provided by engineer. */
"This month" = "This month";
/* No comment provided by engineer. */
"This year" = "This year";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%dM"; // month
"%dw" = "%dw"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
/* Week format for */
"Mon" = "Mon";
"Tue" = "Tue";
"Wed" = "Wed";
"Thu" = "Thu";
"Fri" = "Fri";
"Sat" = "Sat";
"Sun" = "Sun";
"周一" = "星期一";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
================================================
FILE: DateTools/DateTools/DateTools.bundle/es.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Hace %d días";
/* No comment provided by engineer. */
"%d hours ago" = "Hace %d horas";
/* No comment provided by engineer. */
"%d minutes ago" = "Hace %d minutos";
/* No comment provided by engineer. */
"%d months ago" = "Hace %d meses";
/* No comment provided by engineer. */
"%d seconds ago" = "Hace %d segundos";
/* No comment provided by engineer. */
"%d weeks ago" = "Hace %d semanas";
/* No comment provided by engineer. */
"%d years ago" = "Hace %d años";
/* No comment provided by engineer. */
"A minute ago" = "Hace un minuto";
/* No comment provided by engineer. */
"An hour ago" = "Hace una hora";
/* No comment provided by engineer. */
"Just now" = "Ahora mismo";
/* No comment provided by engineer. */
"Last month" = "El mes pasado";
/* No comment provided by engineer. */
"Last week" = "La semana pasada";
/* No comment provided by engineer. */
"Last year" = "El año pasado";
/* No comment provided by engineer. */
"Yesterday" = "Ayer";
/* No comment provided by engineer. */
"1 year ago" = "Hace un año";
/* No comment provided by engineer. */
"1 month ago" = "Hace un mes";
/* No comment provided by engineer. */
"1 week ago" = "Hace una semana";
/* No comment provided by engineer. */
"1 day ago" = "Hace un día";
/* No comment provided by engineer. */
"1 hour ago" = "Hace 1 hora";
/* No comment provided by engineer. */
"This morning" = "Esta mañana";
/* No comment provided by engineer. */
"This afternoon" = "Esta tarde";
/* No comment provided by engineer. */
"Today" = "Hoy";
/* No comment provided by engineer. */
"This week" = "Esta semana";
/* No comment provided by engineer. */
"This month" = "Este mes";
/* No comment provided by engineer. */
"This year" = "Este año";
/* Short format for */
"%dy" = "%da"; // year
"%dM" = "%dM"; // month
"%dw" = "%dS"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/eu.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Orain dela %d egun";
/* No comment provided by engineer. */
"%d hours ago" = "Orain dela %d ordu";
/* No comment provided by engineer. */
"%d minutes ago" = "Orain dela %d minutu";
/* No comment provided by engineer. */
"%d months ago" = "Orain dela %d hile";
/* No comment provided by engineer. */
"%d seconds ago" = "Orain dela %d segundu";
/* No comment provided by engineer. */
"%d weeks ago" = "Orain dela %d aste";
/* No comment provided by engineer. */
"%d years ago" = "Orain dela %d urte";
/* No comment provided by engineer. */
"A minute ago" = "Orain dela minutu bat";
/* No comment provided by engineer. */
"An hour ago" = "Orain dela ordu bat";
/* No comment provided by engineer. */
"Just now" = "Oraintxe bertan";
/* No comment provided by engineer. */
"Last month" = "Pasa den hilean";
/* No comment provided by engineer. */
"Last week" = "Pasa den astean";
/* No comment provided by engineer. */
"Last year" = "Pasa den urtean";
/* No comment provided by engineer. */
"Yesterday" = "Atzo";
/* No comment provided by engineer. */
"1 year ago" = "Orain dela urte bat";
/* No comment provided by engineer. */
"1 month ago" = "Orain dela hile bat";
/* No comment provided by engineer. */
"1 week ago" = "Orain dela aste bat";
/* No comment provided by engineer. */
"1 day ago" = "Orain dela egun bat";
/* No comment provided by engineer. */
"This morning" = "Gaur goizean";
/* No comment provided by engineer. */
"This afternoon" = "Gaur arratsaldean";
/* No comment provided by engineer. */
"Today" = "Gaur";
/* No comment provided by engineer. */
"This week" = "Aste honetan";
/* No comment provided by engineer. */
"This month" = "Hile honetan";
/* No comment provided by engineer. */
"This year" = "Urte honetan";
================================================
FILE: DateTools/DateTools/DateTools.bundle/fi.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d päivää sitten";
/* No comment provided by engineer. */
"%d hours ago" = "%d tuntia sitten";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minuuttia sitten";
/* No comment provided by engineer. */
"%d months ago" = "%d kuukautta sitten";
/* No comment provided by engineer. */
"%d seconds ago" = "%d sekuntia sitten";
/* No comment provided by engineer. */
"%d weeks ago" = "%d viikkoa sitten";
/* No comment provided by engineer. */
"%d years ago" = "%d vuotta sitten";
/* No comment provided by engineer. */
"A minute ago" = "Minuutti sitten";
/* No comment provided by engineer. */
"An hour ago" = "Tunti sitten";
/* No comment provided by engineer. */
"Just now" = "Juuri äsken";
/* No comment provided by engineer. */
"Last month" = "Viime kuussa";
/* No comment provided by engineer. */
"Last week" = "Viime viikolla";
/* No comment provided by engineer. */
"Last year" = "Viime vuonna";
/* No comment provided by engineer. */
"Yesterday" = "Eilen";
/* No comment provided by engineer. */
"1 year ago" = "Vuosi sitten";
/* No comment provided by engineer. */
"1 month ago" = "Kuukausi sitten";
/* No comment provided by engineer. */
"1 week ago" = "Viikko sitten";
/* No comment provided by engineer. */
"1 day ago" = "Vuorokausi sitten";
/* No comment provided by engineer. */
"This morning" = "Tänä aamuna";
/* No comment provided by engineer. */
"This afternoon" = "Tänä iltapäivänä";
/* No comment provided by engineer. */
"Today" = "Tänään";
/* No comment provided by engineer. */
"This week" = "Tällä viikolla";
/* No comment provided by engineer. */
"This month" = "Tässä kuussa";
/* No comment provided by engineer. */
"This year" = "Tänä vuonna";
================================================
FILE: DateTools/DateTools/DateTools.bundle/fr.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Il y a %d jours";
/* No comment provided by engineer. */
"%d hours ago" = "Il y a %d heures";
/* No comment provided by engineer. */
"%d minutes ago" = "Il y a %d minutes";
/* No comment provided by engineer. */
"%d months ago" = "Il y a %d mois";
/* No comment provided by engineer. */
"%d seconds ago" = "Il y a %d secondes";
/* No comment provided by engineer. */
"%d weeks ago" = "Il y a %d semaines";
/* No comment provided by engineer. */
"%d years ago" = "Il y a %d ans";
/* No comment provided by engineer. */
"A minute ago" = "Il y a une minute";
/* No comment provided by engineer. */
"An hour ago" = "Il y a une heure";
/* No comment provided by engineer. */
"Just now" = "A l'instant";
/* No comment provided by engineer. */
"Last month" = "Le mois dernier";
/* No comment provided by engineer. */
"Last week" = "La semaine dernière";
/* No comment provided by engineer. */
"Last year" = "L'année dernière";
/* No comment provided by engineer. */
"Yesterday" = "Hier";
/* No comment provided by engineer. */
"1 year ago" = "Il y a 1 an";
/* No comment provided by engineer. */
"1 month ago" = "Il y a 1 mois";
/* No comment provided by engineer. */
"1 week ago" = "Il y a 1 semaine";
/* No comment provided by engineer. */
"1 day ago" = "Il y a 1 jour";
/* No comment provided by engineer. */
"1 hour ago" = "Il y a 1 heure";
/* No comment provided by engineer. */
"1 minute ago" = "Il y a 1 minute";
/* No comment provided by engineer. */
"1 second ago" = "Il y a 1 seconde";
/* No comment provided by engineer. */
"This morning" = "Ce matin";
/* No comment provided by engineer. */
"This afternoon" = "Cet après-midi";
/* No comment provided by engineer. */
"Today" = "Aujourd'hui";
/* No comment provided by engineer. */
"This week" = "Cette semaine";
/* No comment provided by engineer. */
"This month" = "Ce mois-ci";
/* No comment provided by engineer. */
"This year" = "Cette année";
================================================
FILE: DateTools/DateTools/DateTools.bundle/gu.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d દિવસ પહેલા";
/* No comment provided by engineer. */
"%d hours ago" = "%d કલાક પહેલા";
/* No comment provided by engineer. */
"%d minutes ago" = "%d મિનિટ પહેલા";
/* No comment provided by engineer. */
"%d months ago" = "%d મહિના પહેલા";
/* No comment provided by engineer. */
"%d seconds ago" = "%d સેકન્ડ પહેલા";
/* No comment provided by engineer. */
"%d weeks ago" = "%d અઠવાડિયા પહેલા";
/* No comment provided by engineer. */
"%d years ago" = "%d વર્ષ પહેલા";
/* No comment provided by engineer. */
"A minute ago" = "એક મિનિટ પહેલા";
/* No comment provided by engineer. */
"An hour ago" = "એક કલાક પહેલા";
/* No comment provided by engineer. */
"Just now" = "હમણાં";
/* No comment provided by engineer. */
"Last month" = "ગયા મહિને";
/* No comment provided by engineer. */
"Last week" = "ગયા અઠવાડિયે";
/* No comment provided by engineer. */
"Last year" = "ગયા વર્ષે";
/* No comment provided by engineer. */
"Yesterday" = "ગઈ કાલે";
/* No comment provided by engineer. */
"1 year ago" = "1 વર્ષ પહેલાં";
/* No comment provided by engineer. */
"1 month ago" = "1 મહિનો પહેલા";
/* No comment provided by engineer. */
"1 week ago" = "1 અઠવાડિયું પહેલા";
/* No comment provided by engineer. */
"1 day ago" = "1 દિવસ પહેલાં";
/* No comment provided by engineer. */
"1 hour ago" = "1 કલાક પહેલા";
/* No comment provided by engineer. */
"1 minute ago" = "1 મિનિટ પહેલા";
/* No comment provided by engineer. */
"1 second ago" = "1 સેકન્ડ પહેલા";
/* No comment provided by engineer. */
"This morning" = "આ સવારે";
/* No comment provided by engineer. */
"This afternoon" = "આજે બપોરે";
/* No comment provided by engineer. */
"Today" = "આજે";
/* No comment provided by engineer. */
"This week" = "આ અઠવાડિયેું";
/* No comment provided by engineer. */
"This month" = "આ મહિને";
/* No comment provided by engineer. */
"This year" = "આ વર્ષે";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%dM"; // month
"%dw" = "%dw"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/he.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "לפני %d ימים";
/* No comment provided by engineer. */
"%d hours ago" = "לפני %d שעות";
/* No comment provided by engineer. */
"%d minutes ago" = "לפני %d דקות";
/* No comment provided by engineer. */
"%d months ago" = "לפני %d חודשים";
/* No comment provided by engineer. */
"%d seconds ago" = "לפני %d שניות";
/* No comment provided by engineer. */
"%d weeks ago" = "לפני %d שבועות";
/* No comment provided by engineer. */
"%d years ago" = "לפני %d שנים";
/* No comment provided by engineer. */
"A minute ago" = "לפני דקה";
/* No comment provided by engineer. */
"An hour ago" = "לפני שעה";
/* No comment provided by engineer. */
"Just now" = "ממש עכשיו";
/* No comment provided by engineer. */
"Last month" = "בחודש שעבר";
/* No comment provided by engineer. */
"Last week" = "בשבוע שעבר";
/* No comment provided by engineer. */
"Last year" = "בשנה שעברה";
/* No comment provided by engineer. */
"Yesterday" = "אתמול";
/* No comment provided by engineer. */
"1 year ago" = "לפני שנה";
/* No comment provided by engineer. */
"1 month ago" = "לפני חודש";
/* No comment provided by engineer. */
"1 week ago" = "לפני שבוע";
/* No comment provided by engineer. */
"1 day ago" = "לפני יום";
/* No comment provided by engineer. */
"This morning" = "הבוקר";
/* No comment provided by engineer. */
"This afternoon" = "בצהריים";
/* No comment provided by engineer. */
"Today" = "היום";
/* No comment provided by engineer. */
"This week" = "השבוע";
/* No comment provided by engineer. */
"This month" = "החודש";
/* No comment provided by engineer. */
"This year" = "השנה";
================================================
FILE: DateTools/DateTools/DateTools.bundle/hi.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d दिन पहले";
/* No comment provided by engineer. */
"%d hours ago" = "%d घंटे पहले";
/* No comment provided by engineer. */
"%d minutes ago" = "%d मिनट पहले";
/* No comment provided by engineer. */
"%d months ago" = "%d महीन पहले";
/* No comment provided by engineer. */
"%d seconds ago" = "%d सेकंड पहले";
/* No comment provided by engineer. */
"%d weeks ago" = "%d हफ्ते पहले";
/* No comment provided by engineer. */
"%d years ago" = "%d साल पहले";
/* No comment provided by engineer. */
"A minute ago" = "एक मिनट पहले";
/* No comment provided by engineer. */
"An hour ago" = "एक घंटे पहले";
/* No comment provided by engineer. */
"Just now" = "बस अभी";
/* No comment provided by engineer. */
"Last month" = "पिछले महीने";
/* No comment provided by engineer. */
"Last week" = "पिछले हफ्ते";
/* No comment provided by engineer. */
"Last year" = "पिछले साल";
/* No comment provided by engineer. */
"Yesterday" = "कल";
/* No comment provided by engineer. */
"1 year ago" = "1 साल पहले";
/* No comment provided by engineer. */
"1 month ago" = "1 महीने पहले";
/* No comment provided by engineer. */
"1 week ago" = "1 हफ्ते पहले";
/* No comment provided by engineer. */
"1 day ago" = "1 दिन पहले";
/* No comment provided by engineer. */
"1 hour ago" = "1 घंटे पहले";
/* No comment provided by engineer. */
"1 minute ago" = "1 मिनट पहले";
/* No comment provided by engineer. */
"1 second ago" = "1 सेकंड पहले";
/* No comment provided by engineer. */
"This morning" = "आज सुबह";
/* No comment provided by engineer. */
"This afternoon" = "यह दोपहर";
/* No comment provided by engineer. */
"Today" = "आज";
/* No comment provided by engineer. */
"This week" = "इस सप्ताह";
/* No comment provided by engineer. */
"This month" = "इस महीने";
/* No comment provided by engineer. */
"This year" = "इस साल";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%dM"; // month
"%dw" = "%dw"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/hr.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dana";
/* No comment provided by engineer. */
"%d hours ago" = "%d prime sati";
/* No comment provided by engineer. */
"%d minutes ago" = "%d prije minuta";
/* No comment provided by engineer. */
"%d months ago" = "%d prije nekoliko mjeseci";
/* No comment provided by engineer. */
"%d seconds ago" = "%d sekunde prije";
/* No comment provided by engineer. */
"%d weeks ago" = "%d prije nekoliko tjedana";
/* No comment provided by engineer. */
"%d years ago" = "%d prije nekoliko godina";
/* No comment provided by engineer. */
"A minute ago" = "prije minute";
/* No comment provided by engineer. */
"An hour ago" = "prije sat vremena";
/* No comment provided by engineer. */
"Just now" = "upravo sada";
/* No comment provided by engineer. */
"Last month" = "prosli mjesec";
/* No comment provided by engineer. */
"Last week" = "prosli tjedan";
/* No comment provided by engineer. */
"Last year" = "prosle godine";
/* No comment provided by engineer. */
"Yesterday" = "jucer";
/* No comment provided by engineer. */
"1 year ago" = "Prije 1 godina";
================================================
FILE: DateTools/DateTools/DateTools.bundle/hu.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d napja";
/* No comment provided by engineer. */
"%d hours ago" = "%d órája";
/* No comment provided by engineer. */
"%d minutes ago" = "%d perce";
/* No comment provided by engineer. */
"%d months ago" = "%d hónapja";
/* No comment provided by engineer. */
"%d seconds ago" = "%d másodperce";
/* No comment provided by engineer. */
"%d weeks ago" = "%d hete";
/* No comment provided by engineer. */
"%d years ago" = "%d éve";
/* No comment provided by engineer. */
"A minute ago" = "Egy perccel ezelőtt";
/* No comment provided by engineer. */
"An hour ago" = "Egy órával ezelőtt";
/* No comment provided by engineer. */
"Just now" = "Az imént";
/* No comment provided by engineer. */
"Last month" = "Az előző hónapban";
/* No comment provided by engineer. */
"Last week" = "Az előző héten";
/* No comment provided by engineer. */
"Last year" = "Tavaly";
/* No comment provided by engineer. */
"Yesterday" = "Tegnap";
/* No comment provided by engineer. */
"1 year ago" = "Tavaly";
/* No comment provided by engineer. */
"1 month ago" = "Egy hónapja";
/* No comment provided by engineer. */
"1 week ago" = "Egy hete";
/* No comment provided by engineer. */
"1 day ago" = "Tegnap";
/* No comment provided by engineer. */
"This morning" = "Ma reggel";
/* No comment provided by engineer. */
"This afternoon" = "Ma délután";
/* No comment provided by engineer. */
"Today" = "Ma";
/* No comment provided by engineer. */
"This week" = "Ezen a héten";
/* No comment provided by engineer. */
"This month" = "Ebben a hónapban";
/* No comment provided by engineer. */
"This year" = "Idén";
================================================
FILE: DateTools/DateTools/DateTools.bundle/id.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d hari yang lalu";
/* No comment provided by engineer. */
"%d hours ago" = "%d jam yang lalu";
/* No comment provided by engineer. */
"%d minutes ago" = "%d menit yang lalu";
/* No comment provided by engineer. */
"%d months ago" = "%d bulan yang lalu";
/* No comment provided by engineer. */
"%d seconds ago" = "%d detik yang lalu";
/* No comment provided by engineer. */
"%d weeks ago" = "%d minggu yang lalu";
/* No comment provided by engineer. */
"%d years ago" = "%d tahun yang lalu";
/* No comment provided by engineer. */
"A minute ago" = "Semenit yang lalu";
/* No comment provided by engineer. */
"An hour ago" = "Sejam yang lalu";
/* No comment provided by engineer. */
"Just now" = "Sekarang";
/* No comment provided by engineer. */
"Last month" = "Bulan lalu";
/* No comment provided by engineer. */
"Last week" = "Minggu lalu";
/* No comment provided by engineer. */
"Last year" = "Tahun lalu";
/* No comment provided by engineer. */
"Yesterday" = "Kemarin";
/* No comment provided by engineer. */
"1 year ago" = "1 tahun yang lalu";
/* No comment provided by engineer. */
"1 month ago" = "1 bulan yang lalu";
/* No comment provided by engineer. */
"1 week ago" = "1 minggu yang lalu";
/* No comment provided by engineer. */
"1 day ago" = "1 hari yang lalu";
/* No comment provided by engineer. */
"This morning" = "Pagi ini";
/* No comment provided by engineer. */
"This afternoon" = "Sore ini";
/* No comment provided by engineer. */
"Today" = "Hari ini";
/* No comment provided by engineer. */
"This week" = "Minggu ini";
/* No comment provided by engineer. */
"This month" = "Bulan ini";
/* No comment provided by engineer. */
"This year" = "Tahun ini";
================================================
FILE: DateTools/DateTools/DateTools.bundle/is.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dögum síðan";
/* No comment provided by engineer. */
"%d hours ago" = "%d klst. síðan";
/* No comment provided by engineer. */
"%d minutes ago" = "%d mínútum síðan";
/* No comment provided by engineer. */
"%d months ago" = "%d mánuðum síðan";
/* No comment provided by engineer. */
"%d seconds ago" = "%d sekúndum síðan";
/* No comment provided by engineer. */
"%d weeks ago" = "%d vikum síðan";
/* No comment provided by engineer. */
"%d years ago" = "%d árum síðan";
/* No comment provided by engineer. */
"A minute ago" = "Einni mínútu síðan";
/* No comment provided by engineer. */
"An hour ago" = "Einni klst. síðan";
/* No comment provided by engineer. */
"Just now" = "Rétt í þessu";
/* No comment provided by engineer. */
"Last month" = "Í síðasta mánuði";
/* No comment provided by engineer. */
"Last week" = "Í síðustu viku";
/* No comment provided by engineer. */
"Last year" = "Á síðasta ári";
/* No comment provided by engineer. */
"Yesterday" = "Í gær";
/* No comment provided by engineer. */
"1 year ago" = "1 ári síðan";
/* No comment provided by engineer. */
"1 month ago" = "1 mánuði síðan";
/* No comment provided by engineer. */
"1 week ago" = "1 viku síðan";
/* No comment provided by engineer. */
"1 day ago" = "1 degi síðan";
/* No comment provided by engineer. */
"This morning" = "Í morgun";
/* No comment provided by engineer. */
"This afternoon" = "Síðdegis";
/* No comment provided by engineer. */
"Today" = "Í dag";
/* No comment provided by engineer. */
"This week" = "Í þessari viku";
/* No comment provided by engineer. */
"This month" = "Í þessum mánuði";
/* No comment provided by engineer. */
"This year" = "Á þessu ári";
================================================
FILE: DateTools/DateTools/DateTools.bundle/it.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d giorni fa";
/* No comment provided by engineer. */
"%d hours ago" = "%d ore fa";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minuti fa";
/* No comment provided by engineer. */
"%d months ago" = "%d mesi fa";
/* No comment provided by engineer. */
"%d seconds ago" = "%d secondi fa";
/* No comment provided by engineer. */
"%d weeks ago" = "%d settimane fa";
/* No comment provided by engineer. */
"%d years ago" = "%d anni fa";
/* No comment provided by engineer. */
"A minute ago" = "Un minuto fa";
/* No comment provided by engineer. */
"An hour ago" = "Un'ora fa";
/* No comment provided by engineer. */
"Just now" = "Ora";
/* No comment provided by engineer. */
"Last month" = "Il mese scorso";
/* No comment provided by engineer. */
"Last week" = "La settimana scorsa";
/* No comment provided by engineer. */
"Last year" = "L'anno scorso";
/* No comment provided by engineer. */
"Yesterday" = "Ieri";
/* No comment provided by engineer. */
"1 year ago" = "Un anno fa";
/* No comment provided by engineer. */
"1 month ago" = "Un mese fa";
/* No comment provided by engineer. */
"1 week ago" = "Una settimana fa";
/* No comment provided by engineer. */
"1 day ago" = "Un giorno fa";
/* No comment provided by engineer. */
"This morning" = "Questa mattina";
/* No comment provided by engineer. */
"This afternoon" = "Questo pomeriggio";
/* No comment provided by engineer. */
"Today" = "Oggi";
/* No comment provided by engineer. */
"This week" = "Questa settimana";
/* No comment provided by engineer. */
"This month" = "Questo mese";
/* No comment provided by engineer. */
"This year" = "Quest'anno";
================================================
FILE: DateTools/DateTools/DateTools.bundle/ja.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d日前";
/* No comment provided by engineer. */
"%d hours ago" = "%d時間前";
/* No comment provided by engineer. */
"%d minutes ago" = "%d分前";
/* No comment provided by engineer. */
"%d months ago" = "%dヶ月前";
/* No comment provided by engineer. */
"%d seconds ago" = "%d秒前";
/* No comment provided by engineer. */
"%d weeks ago" = "%d週間前";
/* No comment provided by engineer. */
"%d years ago" = "%d年前";
/* No comment provided by engineer. */
"A minute ago" = "1分前";
/* No comment provided by engineer. */
"An hour ago" = "1時間前";
/* No comment provided by engineer. */
"Just now" = "たった今";
/* No comment provided by engineer. */
"Last month" = "先月";
/* No comment provided by engineer. */
"Last week" = "先週";
/* No comment provided by engineer. */
"Last year" = "去年";
/* No comment provided by engineer. */
"Yesterday" = "昨日";
/* No comment provided by engineer. */
"1 year ago" = "1年前";
/* No comment provided by engineer. */
"1 month ago" = "1ヶ月前";
/* No comment provided by engineer. */
"1 week ago" = "1週間前";
/* No comment provided by engineer. */
"1 day ago" = "1日前";
/* No comment provided by engineer. */
"1 hour ago" = "1時間前";
/* No comment provided by engineer. */
"1 minute ago" = "1分前";
/* No comment provided by engineer. */
"1 second ago" = "1秒前";
/* No comment provided by engineer. */
"This morning" = "午前";
/* No comment provided by engineer. */
"This afternoon" = "午後";
/* No comment provided by engineer. */
"Today" = "今日";
/* No comment provided by engineer. */
"This week" = "今週";
/* No comment provided by engineer. */
"This month" = "今月";
/* No comment provided by engineer. */
"This year" = "今年";
/* Short format for */
"%dy" = "%d年"; // year
"%dM" = "%d月"; // month
"%dw" = "%d週"; // week
"%dd" = "%d日"; // day
"%dh" = "%d時間"; // hour
"%dm" = "%d分"; // minute
"%ds" = "%d秒"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/ko.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d일 전";
/* No comment provided by engineer. */
"%d hours ago" = "%d시간 전";
/* No comment provided by engineer. */
"%d minutes ago" = "%d분 전";
/* No comment provided by engineer. */
"%d months ago" = "%d개월 전";
/* No comment provided by engineer. */
"%d seconds ago" = "%d초 전";
/* No comment provided by engineer. */
"%d weeks ago" = "%d주 전";
/* No comment provided by engineer. */
"%d years ago" = "%d년 전";
/* No comment provided by engineer. */
"A minute ago" = "1분 전";
/* No comment provided by engineer. */
"An hour ago" = "1시간 전";
/* No comment provided by engineer. */
"Just now" = "방금 전";
/* No comment provided by engineer. */
"Last month" = "지난 달";
/* No comment provided by engineer. */
"Last week" = "지난 주";
/* No comment provided by engineer. */
"Last year" = "지난 해";
/* No comment provided by engineer. */
"Yesterday" = "어제";
/* No comment provided by engineer. */
"1 year ago" = "1년 전";
/* No comment provided by engineer. */
"1 month ago" = "1개월 전";
/* No comment provided by engineer. */
"1 week ago" = "1주 전";
/* No comment provided by engineer. */
"1 day ago" = "1일 전";
/* No comment provided by engineer. */
"This morning" = "오늘 아침";
/* No comment provided by engineer. */
"This afternoon" = "오늘 오후";
/* No comment provided by engineer. */
"Today" = "오늘";
/* No comment provided by engineer. */
"This week" = "이번 주";
/* No comment provided by engineer. */
"This month" = "이번 달";
/* No comment provided by engineer. */
"This year" = "올해";
================================================
FILE: DateTools/DateTools/DateTools.bundle/lv.lproj/DateTools.strings
================================================
"1 year ago" = "Pirms gada";
"1 month ago" = "Pirms mēneša";
"1 week ago" = "Pirms nedēļas";
"1 day ago" = "Pirms dienas";
"A minute ago" = "Pirms minūtes";
"An hour ago" = "Pirms stundas";
"Last month" = "Pagājušajā mēnesī";
"Last week" = "Pagājušajā nedēļā";
"Last year" = "Pagājušajā gadā";
"Just now" = "Tikko";
"Today" = "Šodien";
"Yesterday" = "Vakar";
"This morning" = "Šorīt";
"This afternoon" = "Pēcpusdienā";
"This week" = "Šonedēļ";
"This month" = "Šomēnes";
"This year" = "Šogad";
"%d seconds ago" = "Pirms %d sekundēm";
"%d minutes ago" = "Pirms %d minūtēm";
"%d hours ago" = "Pirms %d stundām";
"%d days ago" = "Pirms %d dienām";
"%d weeks ago" = "Pirms %d nedēļām";
"%d months ago" = "Pirms %d mēnešiem";
"%d years ago" = "Pirms %d gadiem";
================================================
FILE: DateTools/DateTools/DateTools.bundle/ms.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d hari yang lepas";
/* No comment provided by engineer. */
"%d hours ago" = "%d jam yang lepas";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minit yang lepas";
/* No comment provided by engineer. */
"%d months ago" = "%d bulan yang lepas";
/* No comment provided by engineer. */
"%d seconds ago" = "%d saat yang lepas";
/* No comment provided by engineer. */
"%d weeks ago" = "%d minggu yang lepas";
/* No comment provided by engineer. */
"%d years ago" = "%d tahun yang lepas";
/* No comment provided by engineer. */
"A minute ago" = "Seminit yang lepas";
/* No comment provided by engineer. */
"An hour ago" = "Sejam yang lepas";
/* No comment provided by engineer. */
"Just now" = "Sebentar tadi";
/* No comment provided by engineer. */
"Last month" = "Bulan lepas";
/* No comment provided by engineer. */
"Last week" = "Minggu lepas";
/* No comment provided by engineer. */
"Last year" = "Tahun lepas";
/* No comment provided by engineer. */
"Yesterday" = "Semalam";
/* No comment provided by engineer. */
"1 year ago" = "1 tahun lepas";
/* No comment provided by engineer. */
"1 month ago" = "1 bulan lepas";
/* No comment provided by engineer. */
"1 week ago" = "1 minggu lepas";
/* No comment provided by engineer. */
"1 day ago" = "1 hari lepas";
/* No comment provided by engineer. */
"1 hour ago" = "1 jam lepas";
/* No comment provided by engineer. */
"1 minute ago" = "1 minit lepas";
/* No comment provided by engineer. */
"1 second ago" = "1 saat lepas";
/* No comment provided by engineer. */
"This morning" = "Pagi ini";
/* No comment provided by engineer. */
"This afternoon" = "Petang ini";
/* No comment provided by engineer. */
"Today" = "Hari ini";
/* No comment provided by engineer. */
"This week" = "Minggu ini";
/* No comment provided by engineer. */
"This month" = "Bulan ini";
/* No comment provided by engineer. */
"This year" = "Tahun ini";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%dM"; // month
"%dw" = "%dw"; // week
"%dd" = "%dd"; // day
"%dh" = "%dh"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/nb.lproj/DateTools.strings
================================================
/*
RULES:
Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is last two digits;
*/
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d days ago" = "%d dager siden";
/* If Y != 1 AND Y < 5; */
"%d _days ago" = "%d dager siden";
/* If Y == 1; */
"%d __days ago" = "%d dag siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d hours ago" = "%d timer siden";
/* If Y != 1 AND Y < 5; */
"%d _hours ago" = "%d timer siden";
/* If Y == 1; */
"%d __hours ago" = "%d time siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d minutes ago" = "%d minutter siden";
/* If Y != 1 AND Y < 5; */
"%d _minutes ago" = "%d minutter siden";
/* If Y == 1; */
"%d __minutes ago" = "%d minutt siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d months ago" = "%d måneder siden";
/* If Y != 1 AND Y < 5; */
"%d _months ago" = "%d måneder siden";
/* If Y == 1; */
"%d __months ago" = "%d måned siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d seconds ago" = "%d sekunder siden";
/* If Y != 1 AND Y < 5; */
"%d _seconds ago" = "%d sekunder siden";
/* If Y == 1; */
"%d __seconds ago" = "%d sekund siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d weeks ago" = "%d uker siden";
/* If Y != 1 AND Y < 5; */
"%d _weeks ago" = "%d uker siden";
/* If Y == 1; */
"%d __weeks ago" = "%d uke siden";
/* Y ==0 OR Y > 4 OR XY == 11; */
"%d years ago" = "%d år siden";
/* If Y != 1 AND Y < 5; */
"%d _years ago" = "%d år siden";
/* If Y == 1; */
"%d __years ago" = "%d år siden";
/* No comment provided by engineer. */
"A minute ago" = "Et minutt siden";
/* No comment provided by engineer. */
"An hour ago" = "En time siden";
/* No comment provided by engineer. */
"Just now" = "Nå";
/* No comment provided by engineer. */
"Last month" = "For en måned siden";
/* No comment provided by engineer. */
"Last week" = "For en uke siden";
/* No comment provided by engineer. */
"Last year" = "For et år siden";
/* No comment provided by engineer. */
"Yesterday" = "I går";
/* No comment provided by engineer. */
"1 year ago" = "1 år siden";
/* No comment provided by engineer. */
"1 month ago" = "1 måned siden";
/* No comment provided by engineer. */
"1 week ago" = "1 uke siden";
/* No comment provided by engineer. */
"1 day ago" = "1 dag siden";
/* No comment provided by engineer. */
"This morning" = "Denne morgenen";
/* No comment provided by engineer. */
"This afternoon" = "I ettermiddag";
/* No comment provided by engineer. */
"Today" = "I dag";
/* No comment provided by engineer. */
"This week" = "Denne uken";
/* No comment provided by engineer. */
"This month" = "Denne måneden";
/* No comment provided by engineer. */
"This year" = "Dette året";
================================================
FILE: DateTools/DateTools/DateTools.bundle/nl.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dagen geleden";
/* No comment provided by engineer. */
"%d hours ago" = "%d uur geleden";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minuten geleden";
/* No comment provided by engineer. */
"%d months ago" = "%d maanden geleden";
/* No comment provided by engineer. */
"%d seconds ago" = "%d seconden geleden";
/* No comment provided by engineer. */
"%d weeks ago" = "%d weken geleden";
/* No comment provided by engineer. */
"%d years ago" = "%d jaar geleden";
/* No comment provided by engineer. */
"A minute ago" = "Een minuut geleden";
/* No comment provided by engineer. */
"An hour ago" = "Een uur geleden";
/* No comment provided by engineer. */
"Just now" = "Zojuist";
/* No comment provided by engineer. */
"Last month" = "Vorige maand";
/* No comment provided by engineer. */
"Last week" = "Vorige week";
/* No comment provided by engineer. */
"Last year" = "Vorig jaar";
/* No comment provided by engineer. */
"Yesterday" = "Gisteren";
/* No comment provided by engineer. */
"1 year ago" = "1 jaar geleden";
/* No comment provided by engineer. */
"1 month ago" = "1 maand geleden";
/* No comment provided by engineer. */
"1 week ago" = "1 week geleden";
/* No comment provided by engineer. */
"1 day ago" = "1 dag geleden";
/* No comment provided by engineer. */
"This morning" = "Vanmorgen";
/* No comment provided by engineer. */
"This afternoon" = "Vanmiddag";
/* No comment provided by engineer. */
"Today" = "Vandaag";
/* No comment provided by engineer. */
"This week" = "Deze week";
/* No comment provided by engineer. */
"This month" = "Deze maand";
/* No comment provided by engineer. */
"This year" = "Dit jaar";
================================================
FILE: DateTools/DateTools/DateTools.bundle/pl.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dni temu";
/* No comment provided by engineer. */
"%d hours ago" = "%d godzin(y) temu";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minut(y) temu";
/* No comment provided by engineer. */
"%d months ago" = "%d miesiące/-y temu";
/* No comment provided by engineer. */
"%d seconds ago" = "%d sekund(y) temu";
/* No comment provided by engineer. */
"%d weeks ago" = "%d tygodni(e) temu";
/* No comment provided by engineer. */
"%d years ago" = "%d lat(a) temu";
/* No comment provided by engineer. */
"A minute ago" = "Minutę temu";
/* No comment provided by engineer. */
"An hour ago" = "Godzinę temu";
/* No comment provided by engineer. */
"Just now" = "W tej chwili";
/* No comment provided by engineer. */
"Last month" = "W zeszłym miesiącu";
/* No comment provided by engineer. */
"Last week" = "W zeszłym tygodniu";
/* No comment provided by engineer. */
"Last year" = "W zeszłym roku";
/* No comment provided by engineer. */
"Yesterday" = "Wczoraj";
/* No comment provided by engineer. */
"1 year ago" = "1 rok temu";
/* No comment provided by engineer. */
"1 month ago" = "1 miesiąc temu";
/* No comment provided by engineer. */
"1 week ago" = "1 tydzień temu";
/* No comment provided by engineer. */
"1 day ago" = "1 dzień temu";
/* No comment provided by engineer. */
"This morning" = "Dziś rano";
/* No comment provided by engineer. */
"This afternoon" = "Dziś po południu";
/* No comment provided by engineer. */
"Today" = "Dzisiaj";
/* No comment provided by engineer. */
"This week" = "W tym tygodniu";
/* No comment provided by engineer. */
"This month" = "W tym miesiącu";
/* No comment provided by engineer. */
"This year" = "W tym roku";
================================================
FILE: DateTools/DateTools/DateTools.bundle/pt-PT.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dias atrás";
/* No comment provided by engineer. */
"%d hours ago" = "%d horas atrás";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minutos atrás";
/* No comment provided by engineer. */
"%d months ago" = "%d meses atrás";
/* No comment provided by engineer. */
"%d seconds ago" = "%d segundos atrás";
/* No comment provided by engineer. */
"%d weeks ago" = "%d semanas atrás";
/* No comment provided by engineer. */
"%d years ago" = "%d anos atrás";
/* No comment provided by engineer. */
"A minute ago" = "Um minuto atrás";
/* No comment provided by engineer. */
"An hour ago" = "Uma hora atrás";
/* No comment provided by engineer. */
"Just now" = "Agora mesmo";
/* No comment provided by engineer. */
"Last month" = "Mês passado";
/* No comment provided by engineer. */
"Last week" = "Semana passada";
/* No comment provided by engineer. */
"Last year" = "Ano passado";
/* No comment provided by engineer. */
"Yesterday" = "Ontem";
/* No comment provided by engineer. */
"1 year ago" = "1 ano passado";
/* No comment provided by engineer. */
"1 month ago" = "1 mês atrás";
/* No comment provided by engineer. */
"1 week ago" = "1 semana atrás";
/* No comment provided by engineer. */
"1 day ago" = "1 dia atrás";
/* No comment provided by engineer. */
"This morning" = "Esta manhã";
/* No comment provided by engineer. */
"This afternoon" = "Esta tarde";
/* No comment provided by engineer. */
"Today" = "Hoje";
/* No comment provided by engineer. */
"This week" = "Esta semana";
/* No comment provided by engineer. */
"This month" = "Este mês";
/* No comment provided by engineer. */
"This year" = "Este ano";
================================================
FILE: DateTools/DateTools/DateTools.bundle/pt.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d dias atrás";
/* No comment provided by engineer. */
"%d hours ago" = "%d horas atrás";
/* No comment provided by engineer. */
"%d minutes ago" = "%d minutos atrás";
/* No comment provided by engineer. */
"%d months ago" = "%d meses atrás";
/* No comment provided by engineer. */
"%d seconds ago" = "%d segundos atrás";
/* No comment provided by engineer. */
"%d weeks ago" = "%d semanas atrás";
/* No comment provided by engineer. */
"%d years ago" = "%d anos atrás";
/* No comment provided by engineer. */
"A minute ago" = "Há um minuto";
/* No comment provided by engineer. */
"An hour ago" = "Há uma hora";
/* No comment provided by engineer. */
"Just now" = "Agora";
/* No comment provided by engineer. */
"Last month" = "Mês passado";
/* No comment provided by engineer. */
"Last week" = "Semana passada";
/* No comment provided by engineer. */
"Last year" = "Ano passado";
/* No comment provided by engineer. */
"Yesterday" = "Ontem";
/* No comment provided by engineer. */
"1 year ago" = "1 ano atrás";
/* No comment provided by engineer. */
"1 month ago" = "1 mês atrás";
/* No comment provided by engineer. */
"1 week ago" = "1 semana atrás";
/* No comment provided by engineer. */
"1 day ago" = "1 dia atrás";
/* No comment provided by engineer. */
"This morning" = "Esta manhã";
/* No comment provided by engineer. */
"This afternoon" = "Esta tarde";
/* No comment provided by engineer. */
"Today" = "Hoje";
/* No comment provided by engineer. */
"This week" = "Esta semana";
/* No comment provided by engineer. */
"This month" = "Este mês";
/* No comment provided by engineer. */
"This year" = "Este ano";
================================================
FILE: DateTools/DateTools/DateTools.bundle/ro.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "În urmă cu %d zile";
/* No comment provided by engineer. */
"%d hours ago" = "În urmă cu %d ore";
/* No comment provided by engineer. */
"%d minutes ago" = "În urmă cu %d minute";
/* No comment provided by engineer. */
"%d months ago" = "În urmă cu %d luni";
/* No comment provided by engineer. */
"%d seconds ago" = "În urmă cu %d secunde";
/* No comment provided by engineer. */
"%d weeks ago" = "În urmă cu %d săptămâni";
/* No comment provided by engineer. */
"%d years ago" = "În urmă cu %d ani";
/* No comment provided by engineer. */
"A minute ago" = "În urmă cu 1 minut";
/* No comment provided by engineer. */
"An hour ago" = "În urmă cu 1 oră";
/* No comment provided by engineer. */
"Just now" = "Acum câteva momente";
/* No comment provided by engineer. */
"Last month" = "Luna trecută";
/* No comment provided by engineer. */
"Last week" = "Săptămâna trecută";
/* No comment provided by engineer. */
"Last year" = "Anul trecut";
/* No comment provided by engineer. */
"Yesterday" = "Ieri";
/* No comment provided by engineer. */
"1 year ago" = "În urmă cu 1 an";
/* No comment provided by engineer. */
"1 month ago" = "În urmă cu 1 lună";
/* No comment provided by engineer. */
"1 week ago" = "În urmă cu 1 săptămână";
/* No comment provided by engineer. */
"1 day ago" = "În urmă cu 1 zi";
/* No comment provided by engineer. */
"This morning" = "Azi dimineață";
/* No comment provided by engineer. */
"This afternoon" = "În această seară";
/* No comment provided by engineer. */
"Today" = "Astăzi";
/* No comment provided by engineer. */
"This week" = "Săptămâna aceasta";
/* No comment provided by engineer. */
"This month" = "Luna aceasta";
/* No comment provided by engineer. */
"This year" = "Anul acesta";
/* Short format for */
"%dy" = "%da"; // year (an)
"%dM" = "%dl"; // month (luna)
"%dw" = "%dS"; // week (saptamana)
"%dd" = "%dz"; // day (ziua)
"%dh" = "%do"; // hour (ora)
"%dm" = "%dm"; // minute (minut)
"%ds" = "%ds"; // second (secunda)
================================================
FILE: DateTools/DateTools/DateTools.bundle/ru.lproj/DateTools.strings
================================================
/*
RULES:
Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is last two digits;
*/
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d days ago" = "%d дней назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _days ago" = "%d дня назад";
/* Y == 1 AND XY != 11; */
"%d __days ago" = "%d день назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d hours ago" = "%d часов назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _hours ago" = "%d часа назад";
/* Y == 1 AND XY != 11; */
"%d __hours ago" = "%d час назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d minutes ago" = "%d минут назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _minutes ago" = "%d минуты назад";
/* Y == 1 AND XY != 11; */
"%d __minutes ago" = "%d минуту назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d months ago" = "%d месяцев назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _months ago" = "%d месяца назад";
/* Y == 1 AND XY != 11; */
"%d __months ago" = "%d месяц назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d seconds ago" = "%d секунд назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _seconds ago" = "%d секунды назад";
/* Y == 1 AND XY != 11; */
"%d __seconds ago" = "%d секунду назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d weeks ago" = "%d недель назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _weeks ago" = "%d недели назад";
/* Y == 1 AND XY != 11; */
"%d __weeks ago" = "%d неделю назад";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d years ago" = "%d лет назад";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _years ago" = "%d года назад";
/* Y == 1 AND XY != 11; */
"%d __years ago" = "%d год назад";
/* No comment provided by engineer. */
"A minute ago" = "Минуту назад";
/* No comment provided by engineer. */
"An hour ago" = "Час назад";
/* No comment provided by engineer. */
"Just now" = "Только что";
/* No comment provided by engineer. */
"Last month" = "Месяц назад";
/* No comment provided by engineer. */
"Last week" = "Неделю назад";
/* No comment provided by engineer. */
"Last year" = "Год назад";
/* No comment provided by engineer. */
"Yesterday" = "Вчера";
/* No comment provided by engineer. */
"1 year ago" = "1 год назад";
/* No comment provided by engineer. */
"1 month ago" = "1 месяц назад";
/* No comment provided by engineer. */
"1 week ago" = "1 неделю назад";
/* No comment provided by engineer. */
"1 day ago" = "1 день назад";
/* No comment provided by engineer. */
"This morning" = "Этим утром";
/* No comment provided by engineer. */
"This afternoon" = "Этим днём";
/* No comment provided by engineer. */
"Today" = "Сегодня";
/* No comment provided by engineer. */
"This week" = "На этой неделе";
/* No comment provided by engineer. */
"This month" = "В этом месяце";
/* No comment provided by engineer. */
"This year" = "В этом году";
================================================
FILE: DateTools/DateTools/DateTools.bundle/sk.lproj/NSDateTimeAgo.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "Pred %d dňami";
/* No comment provided by engineer. */
"%d hours ago" = "Pred %d hodinami";
/* No comment provided by engineer. */
"%d minutes ago" = "Pred %d minútami";
/* No comment provided by engineer. */
"%d months ago" = "Pred %d mesiaci";
/* No comment provided by engineer. */
"%d seconds ago" = "Pred %d sekundami";
/* No comment provided by engineer. */
"%d weeks ago" = "Pred %d týždňami";
/* No comment provided by engineer. */
"%d years ago" = "Pred %d rokmi";
/* No comment provided by engineer. */
"A minute ago" = "Pred minútou";
/* No comment provided by engineer. */
"An hour ago" = "Pred hodinou";
/* No comment provided by engineer. */
"Just now" = "Práve teraz";
/* No comment provided by engineer. */
"Last month" = "Minulý mesiac";
/* No comment provided by engineer. */
"Last week" = "Minulý týždeň";
/* No comment provided by engineer. */
"Last year" = "Minulý rok";
/* No comment provided by engineer. */
"Yesterday" = "Včera";
/* No comment provided by engineer. */
"1 year ago" = "Pred rokom";
/* No comment provided by engineer. */
"1 month ago" = "Pred mesiacom";
/* No comment provided by engineer. */
"1 week ago" = "Pred týždňom";
/* No comment provided by engineer. */
"1 day ago" = "Predvčerom";
/* No comment provided by engineer. */
"This morning" = "Dnes dopoludnia";
/* No comment provided by engineer. */
"This afternoon" = "Dnes popoludní";
/* No comment provided by engineer. */
"Today" = "Dnes";
/* No comment provided by engineer. */
"This week" = "Tento týždeň";
/* No comment provided by engineer. */
"This month" = "Tento mesiac";
/* No comment provided by engineer. */
"This year" = "Tento rok";
================================================
FILE: DateTools/DateTools/DateTools.bundle/sl.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "pred %d dnevi";
/* No comment provided by engineer. */
"%d hours ago" = "pred %d urami";
/* No comment provided by engineer. */
"%d minutes ago" = "pred %d minutami";
/* No comment provided by engineer. */
"%d months ago" = "pred %d meseci";
/* No comment provided by engineer. */
"%d seconds ago" = "pred %d sekundami";
/* No comment provided by engineer. */
"%d weeks ago" = "pred %d tedni";
/* No comment provided by engineer. */
"%d years ago" = "pred %d leti";
/* No comment provided by engineer. */
"A minute ago" = "pred eno minuto";
/* No comment provided by engineer. */
"An hour ago" = "pred eno uro";
/* No comment provided by engineer. */
"Just now" = "ravnokar";
/* No comment provided by engineer. */
"Last month" = "prejšnji mesec";
/* No comment provided by engineer. */
"Last week" = "prejšnji teden";
/* No comment provided by engineer. */
"Last year" = "prejšnje leto";
/* No comment provided by engineer. */
"Yesterday" = "včeraj";
/* No comment provided by engineer. */
"1 year ago" = "pred 1 letom";
/* No comment provided by engineer. */
"1 month ago" = "pred 1 mesecem";
/* No comment provided by engineer. */
"1 week ago" = "pred 1 tednom";
/* No comment provided by engineer. */
"1 day ago" = "pred 1 dnevom";
/* No comment provided by engineer. */
"1 hour ago" = "pred 1 uro";
/* No comment provided by engineer. */
"1 minute ago" = "pred 1 minuto";
/* No comment provided by engineer. */
"1 second ago" = "pred 1 sekundo";
/* No comment provided by engineer. */
"This morning" = "zjutraj";
/* No comment provided by engineer. */
"This afternoon" = "zvečer";
/* No comment provided by engineer. */
"Today" = "danes";
/* No comment provided by engineer. */
"This week" = "ta teden";
/* No comment provided by engineer. */
"This month" = "ta mesec";
/* No comment provided by engineer. */
"This year" = "to leto";
/* Short format for */
"%dy" = "%dl"; // year
"%dM" = "%dM"; // month
"%dw" = "%dt"; // week
"%dd" = "%dd"; // day
"%dh" = "%du"; // hour
"%dm" = "%dm"; // minute
"%ds" = "%ds"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/tr.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d gün önce";
/* No comment provided by engineer. */
"%d hours ago" = "%d saat önce";
/* No comment provided by engineer. */
"%d minutes ago" = "%d dakika önce";
/* No comment provided by engineer. */
"%d months ago" = "%d ay önce";
/* No comment provided by engineer. */
"%d seconds ago" = "%d saniye önce";
/* No comment provided by engineer. */
"%d weeks ago" = "%d hafta önce";
/* No comment provided by engineer. */
"%d years ago" = "%d yıl önce";
/* No comment provided by engineer. */
"A minute ago" = "Bir dakika önce";
/* No comment provided by engineer. */
"An hour ago" = "Bir saat önce";
/* No comment provided by engineer. */
"Just now" = "Şimdi";
/* No comment provided by engineer. */
"Last month" = "Geçen ay";
/* No comment provided by engineer. */
"Last week" = "Geçen hafta";
/* No comment provided by engineer. */
"Last year" = "Geçen yıl";
/* No comment provided by engineer. */
"Yesterday" = "Dün";
/* No comment provided by engineer. */
"1 year ago" = "1 yıl önce";
/* No comment provided by engineer. */
"1 month ago" = "1 ay önce";
/* No comment provided by engineer. */
"1 week ago" = "1 hafta önce";
/* No comment provided by engineer. */
"1 day ago" = "1 gün önce";
/* No comment provided by engineer. */
"This morning" = "Bu sabah";
/* No comment provided by engineer. */
"This afternoon" = "Öğleden sonra";
/* No comment provided by engineer. */
"Today" = "Bugün";
/* No comment provided by engineer. */
"This week" = "Bu hafta";
/* No comment provided by engineer. */
"This month" = "Bu ay";
/* No comment provided by engineer. */
"This year" = "Bu yıl";
/* Short format for */
"%dy" = "%dy"; // year
"%dM" = "%day"; // month
"%dw" = "%dh"; // week
"%dd" = "%dg"; // day
"%dh" = "%dsa"; // hour
"%dm" = "%ddk"; // minute
"%ds" = "%dsn"; // second
================================================
FILE: DateTools/DateTools/DateTools.bundle/uk.lproj/DateTools.strings
================================================
/*
RULES:
Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is last two digits;
*/
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d days ago" = "%d днів тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _days ago" = "%d дні тому";
/* Y == 1 AND XY != 11; */
"%d __days ago" = "%d день тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d hours ago" = "%d годин тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _hours ago" = "%d години тому";
/* Y == 1 AND XY != 11; */
"%d __hours ago" = "%d годину тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d minutes ago" = "%d хвилин тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _minutes ago" = "%d хвилини тому";
/* Y == 1 AND XY != 11; */
"%d __minutes ago" = "%d хвилину тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d months ago" = "%d місяців тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _months ago" = "%d місяці тому";
/* Y == 1 AND XY != 11; */
"%d __months ago" = "%d місяць тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d seconds ago" = "%d секунд тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _seconds ago" = "%d секунди тому";
/* Y == 1 AND XY != 11; */
"%d __seconds ago" = "%d секунду тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d weeks ago" = "%d тижнів тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _weeks ago" = "%d тижні тому";
/* Y == 1 AND XY != 11; */
"%d __weeks ago" = "%d тиждень тому";
/* Y == 0 OR Y > 4 OR (XY > 10 AND XY < 15); */
"%d years ago" = "%d років тому";
/* Y > 1 AND Y < 5 AND (XY < 10 OR XY > 20); */
"%d _years ago" = "%d роки тому";
/* Y == 1 AND XY != 11; */
"%d __years ago" = "%d рік тому";
/* No comment provided by engineer. */
"A minute ago" = "Хвилину тому";
/* No comment provided by engineer. */
"An hour ago" = "Годину тому";
/* No comment provided by engineer. */
"Just now" = "Щойно";
/* No comment provided by engineer. */
"Last month" = "Місяць тому";
/* No comment provided by engineer. */
"Last week" = "Тиждень тому";
/* No comment provided by engineer. */
"Last year" = "Рік тому";
/* No comment provided by engineer. */
"Yesterday" = "Вчора";
/* No comment provided by engineer. */
"1 year ago" = "1 рік тому";
/* No comment provided by engineer. */
"1 month ago" = "1 місяць тому";
/* No comment provided by engineer. */
"1 week ago" = "1 тиждень тому";
/* No comment provided by engineer. */
"1 day ago" = "1 день тому";
/* No comment provided by engineer. */
"This morning" = "Цього ранку";
/* No comment provided by engineer. */
"This afternoon" = "Сьогодні вдень";
/* No comment provided by engineer. */
"Today" = "Сьогодні";
/* No comment provided by engineer. */
"This week" = "Цього тижня";
/* No comment provided by engineer. */
"This month" = "Цього місяця";
/* No comment provided by engineer. */
"This year" = "Цього року";
================================================
FILE: DateTools/DateTools/DateTools.bundle/vi.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d ngày trước";
/* No comment provided by engineer. */
"%d hours ago" = "%d giờ trước";
/* No comment provided by engineer. */
"%d minutes ago" = "%d phút trước";
/* No comment provided by engineer. */
"%d months ago" = "%d tháng trước";
/* No comment provided by engineer. */
"%d seconds ago" = "%d giây trước";
/* No comment provided by engineer. */
"%d weeks ago" = "%d tuần trước";
/* No comment provided by engineer. */
"%d years ago" = "%d năm trước";
/* No comment provided by engineer. */
"A minute ago" = "Một phút trước";
/* No comment provided by engineer. */
"An hour ago" = "Một giờ trước";
/* No comment provided by engineer. */
"Just now" = "Vừa mới đây";
/* No comment provided by engineer. */
"Last month" = "Tháng trước";
/* No comment provided by engineer. */
"Last week" = "Tuần trước";
/* No comment provided by engineer. */
"Last year" = "Năm vừa rồi";
/* No comment provided by engineer. */
"Yesterday" = "Hôm qua";
/* No comment provided by engineer. */
"1 year ago" = "1 năm trước";
/* No comment provided by engineer. */
"1 month ago" = "1 tháng trước";
/* No comment provided by engineer. */
"1 week ago" = "1 tuần trước";
/* No comment provided by engineer. */
"1 day ago" = "1 ngày trước";
/* No comment provided by engineer. */
"This morning" = "Sáng nay";
/* No comment provided by engineer. */
"This afternoon" = "Trưa nay";
/* No comment provided by engineer. */
"Today" = "Hôm nay";
/* No comment provided by engineer. */
"This week" = "Tuần này";
/* No comment provided by engineer. */
"This month" = "Tháng này";
/* No comment provided by engineer. */
"This year" = "Năm nay";
================================================
FILE: DateTools/DateTools/DateTools.bundle/zh-Hans.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d天前";
/* No comment provided by engineer. */
"%d hours ago" = "%d小时前";
/* No comment provided by engineer. */
"%d minutes ago" = "%d分钟前";
/* No comment provided by engineer. */
"%d months ago" = "%d个月前";
/* No comment provided by engineer. */
"%d seconds ago" = "%d秒钟前";
/* No comment provided by engineer. */
"%d weeks ago" = "%d星期前";
/* No comment provided by engineer. */
"%d years ago" = "%d年前";
/* No comment provided by engineer. */
"A minute ago" = "1分钟前";
/* No comment provided by engineer. */
"An hour ago" = "1小时前";
/* No comment provided by engineer. */
"Just now" = "刚刚";
/* No comment provided by engineer. */
"Last month" = "上个月";
/* No comment provided by engineer. */
"Last week" = "上星期";
/* No comment provided by engineer. */
"Last year" = "去年";
/* No comment provided by engineer. */
"Yesterday" = "昨天";
/* You can add a space between the number and the characters. */
"1 year ago" = "1年前";
/* You can add a space between the number and the characters. */
"1 month ago" = "1个月前";
/* You can add a space between the number and the characters. */
"1 week ago" = "1星期前";
/* You can add a space between the number and the characters. */
"1 day ago" = "1天前";
/* No comment provided by engineer. */
"This morning" = "今天上午";
/* No comment provided by engineer. */
"This afternoon" = "今天下午";
/* No comment provided by engineer. */
"Today" = "今天";
/* No comment provided by engineer. */
"This week" = "本周";
/* No comment provided by engineer. */
"This month" = "本月";
/* No comment provided by engineer. */
"This year" = "今年";
/* Short format for */
"%dy" = "%d年"; // year
"%dM" = "%d月"; // month
"%dw" = "%d周"; // week
"%dd" = "%d天"; // day
"%dh" = "%d小时"; // hour
"%dm" = "%d分"; // minute
"%ds" = "%d秒"; // second
/* Week format for */
"Mon" = "星期一";
"Tue" = "星期二";
"Wed" = "星期三";
"Thu" = "星期四";
"Fri" = "星期五";
"Sat" = "星期六";
"Sun" = "星期日";
"周一" = "星期一";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
================================================
FILE: DateTools/DateTools/DateTools.bundle/zh-Hant.lproj/DateTools.strings
================================================
/* No comment provided by engineer. */
"%d days ago" = "%d天前";
/* No comment provided by engineer. */
"%d hours ago" = "%d小時前";
/* No comment provided by engineer. */
"%d minutes ago" = "%d分鐘前";
/* No comment provided by engineer. */
"%d months ago" = "%d個月前";
/* No comment provided by engineer. */
"%d seconds ago" = "%d秒鐘前";
/* No comment provided by engineer. */
"%d weeks ago" = "%d星期前";
/* No comment provided by engineer. */
"%d years ago" = "%d年前";
/* No comment provided by engineer. */
"A minute ago" = "1分鐘前";
/* No comment provided by engineer. */
"An hour ago" = "1小時前";
/* No comment provided by engineer. */
"Just now" = "剛剛";
/* No comment provided by engineer. */
"Last month" = "上個月";
/* No comment provided by engineer. */
"Last week" = "上星期";
/* No comment provided by engineer. */
"Last year" = "去年";
/* No comment provided by engineer. */
"Yesterday" = "昨天";
/* No comment provided by engineer. */
"1 year ago" = "1年前";
/* No comment provided by engineer. */
"1 month ago" = "1個月前";
/* No comment provided by engineer. */
"1 week ago" = "1星期前";
/* No comment provided by engineer. */
"1 day ago" = "1天前";
/* No comment provided by engineer. */
"This morning" = "今天上午";
/* No comment provided by engineer. */
"This afternoon" = "今天下午";
/* No comment provided by engineer. */
"Today" = "今天";
/* No comment provided by engineer. */
"This week" = "本周";
/* No comment provided by engineer. */
"This month" = "本月";
/* No comment provided by engineer. */
"This year" = "今年";
/* Short format for */
"%dy" = "%d年"; // year
"%dM" = "%d月"; // month
"%dw" = "%d週"; // week
"%dd" = "%d天"; // day
"%dh" = "%d小時"; // hour
"%dm" = "%d分"; // minute
"%ds" = "%d秒"; // second
/* Week format for */
"Mon" = "星期壹";
"Tue" = "星期二";
"Wed" = "星期三";
"Thu" = "星期四";
"Fri" = "星期五";
"Sat" = "星期六";
"Sun" = "星期日";
"周壹" = "星期壹";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
================================================
FILE: DateTools/DateTools/DateTools.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "DTConstants.h"
#import "DTError.h"
#import "NSDate+DateTools.h"
#import "DTTimePeriod.h"
#import "DTTimePeriodGroup.h"
#import "DTTimePeriodCollection.h"
#import "DTTimePeriodChain.h"
================================================
FILE: DateTools/DateTools/NSDate+DateTools.h
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#ifndef DateToolsLocalizedStrings
#ifdef SPM
#define DateToolsLocalizedStrings(key) \
NSLocalizedStringFromTableInBundle(key, @"DateTools", [NSBundle bundleWithPath:[[SWIFTPM_MODULE_BUNDLE resourcePath] stringByAppendingPathComponent:@"DateTools.bundle"]], nil)
#else
#define DateToolsLocalizedStrings(key) \
NSLocalizedStringFromTableInBundle(key, @"DateTools", [NSBundle bundleWithPath:[[[NSBundle bundleForClass:[DTError class]] resourcePath] stringByAppendingPathComponent:@"DateTools.bundle"]], nil)
#endif
#endif
#import <Foundation/Foundation.h>
#import "DTConstants.h"
@interface NSDate (DateTools)
#pragma mark - Time Ago
+ (NSString*)timeAgoSinceDate:(NSDate*)date;
+ (NSString*)shortTimeAgoSinceDate:(NSDate*)date;
+ (NSString *)weekTimeAgoSinceDate:(NSDate *)date;
- (NSString*)timeAgoSinceNow;
- (NSString *)shortTimeAgoSinceNow;
- (NSString *)weekTimeAgoSinceNow;
- (NSString *)timeAgoSinceDate:(NSDate *)date;
- (NSString *)timeAgoSinceDate:(NSDate *)date numericDates:(BOOL)useNumericDates;
- (NSString *)timeAgoSinceDate:(NSDate *)date numericDates:(BOOL)useNumericDates numericTimes:(BOOL)useNumericTimes;
- (NSString *)shortTimeAgoSinceDate:(NSDate *)date;
- (NSString *)weekTimeAgoSinceDate:(NSDate *)date;
#pragma mark - Date Components Without Calendar
- (NSInteger)era;
- (NSInteger)year;
- (NSInteger)month;
- (NSInteger)day;
- (NSInteger)hour;
- (NSInteger)minute;
- (NSInteger)second;
- (NSInteger)weekday;
- (NSInteger)weekdayOrdinal;
- (NSInteger)quarter;
- (NSInteger)weekOfMonth;
- (NSInteger)weekOfYear;
- (NSInteger)yearForWeekOfYear;
- (NSInteger)daysInMonth;
- (NSInteger)dayOfYear;
-(NSInteger)daysInYear;
-(BOOL)isInLeapYear;
- (BOOL)isToday;
- (BOOL)isTomorrow;
-(BOOL)isYesterday;
- (BOOL)isWeekend;
-(BOOL)isSameDay:(NSDate *)date;
+ (BOOL)isSameDay:(NSDate *)date asDate:(NSDate *)compareDate;
#pragma mark - Date Components With Calendar
- (NSInteger)eraWithCalendar:(NSCalendar *)calendar;
- (NSInteger)yearWithCalendar:(NSCalendar *)calendar;
- (NSInteger)monthWithCalendar:(NSCalendar *)calendar;
- (NSInteger)dayWithCalendar:(NSCalendar *)calendar;
- (NSInteger)hourWithCalendar:(NSCalendar *)calendar;
- (NSInteger)minuteWithCalendar:(NSCalendar *)calendar;
- (NSInteger)secondWithCalendar:(NSCalendar *)calendar;
- (NSInteger)weekdayWithCalendar:(NSCalendar *)calendar;
- (NSInteger)weekdayOrdinalWithCalendar:(NSCalendar *)calendar;
- (NSInteger)quarterWithCalendar:(NSCalendar *)calendar;
- (NSInteger)weekOfMonthWithCalendar:(NSCalendar *)calendar;
- (NSInteger)weekOfYearWithCalendar:(NSCalendar *)calendar;
- (NSInteger)yearForWeekOfYearWithCalendar:(NSCalendar *)calendar;
#pragma mark - Date Creating
+ (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day;
+ (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;
+ (NSDate *)dateWithString:(NSString *)dateString formatString:(NSString *)formatString;
+ (NSDate *)dateWithString:(NSString *)dateString formatString:(NSString *)formatString timeZone:(NSTimeZone *)timeZone;
#pragma mark - Date Editing
#pragma mark Date By Adding
- (NSDate *)dateByAddingYears:(NSInteger)years;
- (NSDate *)dateByAddingMonths:(NSInteger)months;
- (NSDate *)dateByAddingWeeks:(NSInteger)weeks;
- (NSDate *)dateByAddingDays:(NSInteger)days;
- (NSDate *)dateByAddingHours:(NSInteger)hours;
- (NSDate *)dateByAddingMinutes:(NSInteger)minutes;
- (NSDate *)dateByAddingSeconds:(NSInteger)seconds;
#pragma mark Date By Subtracting
- (NSDate *)dateBySubtractingYears:(NSInteger)years;
- (NSDate *)dateBySubtractingMonths:(NSInteger)months;
- (NSDate *)dateBySubtractingWeeks:(NSInteger)weeks;
- (NSDate *)dateBySubtractingDays:(NSInteger)days;
- (NSDate *)dateBySubtractingHours:(NSInteger)hours;
- (NSDate *)dateBySubtractingMinutes:(NSInteger)minutes;
- (NSDate *)dateBySubtractingSeconds:(NSInteger)seconds;
#pragma mark - Date Comparison
#pragma mark Time From
-(NSInteger)yearsFrom:(NSDate *)date;
-(NSInteger)monthsFrom:(NSDate *)date;
-(NSInteger)weeksFrom:(NSDate *)date;
-(NSInteger)daysFrom:(NSDate *)date;
-(double)hoursFrom:(NSDate *)date;
-(double)minutesFrom:(NSDate *)date;
-(double)secondsFrom:(NSDate *)date;
#pragma mark Time From With Calendar
-(NSInteger)yearsFrom:(NSDate *)date calendar:(NSCalendar *)calendar;
-(NSInteger)monthsFrom:(NSDate *)date calendar:(NSCalendar *)calendar;
-(NSInteger)weeksFrom:(NSDate *)date calendar:(NSCalendar *)calendar;
-(NSInteger)daysFrom:(NSDate *)date calendar:(NSCalendar *)calendar;
#pragma mark Time Until
-(NSInteger)yearsUntil;
-(NSInteger)monthsUntil;
-(NSInteger)weeksUntil;
-(NSInteger)daysUntil;
-(double)hoursUntil;
-(double)minutesUntil;
-(double)secondsUntil;
#pragma mark Time Ago
-(NSInteger)yearsAgo;
-(NSInteger)monthsAgo;
-(NSInteger)weeksAgo;
-(NSInteger)daysAgo;
-(double)hoursAgo;
-(double)minutesAgo;
-(double)secondsAgo;
#pragma mark Earlier Than
-(NSInteger)yearsEarlierThan:(NSDate *)date;
-(NSInteger)monthsEarlierThan:(NSDate *)date;
-(NSInteger)weeksEarlierThan:(NSDate *)date;
-(NSInteger)daysEarlierThan:(NSDate *)date;
-(double)hoursEarlierThan:(NSDate *)date;
-(double)minutesEarlierThan:(NSDate *)date;
-(double)secondsEarlierThan:(NSDate *)date;
#pragma mark Later Than
-(NSInteger)yearsLaterThan:(NSDate *)date;
-(NSInteger)monthsLaterThan:(NSDate *)date;
-(NSInteger)weeksLaterThan:(NSDate *)date;
-(NSInteger)daysLaterThan:(NSDate *)date;
-(double)hoursLaterThan:(NSDate *)date;
-(double)minutesLaterThan:(NSDate *)date;
-(double)secondsLaterThan:(NSDate *)date;
#pragma mark Comparators
-(BOOL)isEarlierThan:(NSDate *)date;
-(BOOL)isLaterThan:(NSDate *)date;
-(BOOL)isEarlierThanOrEqualTo:(NSDate *)date;
-(BOOL)isLaterThanOrEqualTo:(NSDate *)date;
#pragma mark - Formatted Dates
#pragma mark Formatted With Style
-(NSString *)formattedDateWithStyle:(NSDateFormatterStyle)style;
-(NSString *)formattedDateWithStyle:(NSDateFormatterStyle)style timeZone:(NSTimeZone *)timeZone;
-(NSString *)formattedDateWithStyle:(NSDateFormatterStyle)style locale:(NSLocale *)locale;
-(NSString *)formattedDateWithStyle:(NSDateFormatterStyle)style timeZone:(NSTimeZone *)timeZone locale:(NSLocale *)locale;
#pragma mark Formatted With Format
-(NSString *)formattedDateWithFormat:(NSString *)format;
-(NSString *)formattedDateWithFormat:(NSString *)format timeZone:(NSTimeZone *)timeZone;
-(NSString *)formattedDateWithFormat:(NSString *)format locale:(NSLocale *)locale;
-(NSString *)formattedDateWithFormat:(NSString *)format timeZone:(NSTimeZone *)timeZone locale:(NSLocale *)locale;
#pragma mark - Helpers
+(NSString *)defaultCalendarIdentifier;
+ (void)setDefaultCalendarIdentifier:(NSString *)identifier;
@end
================================================
FILE: DateTools/DateTools/NSDate+DateTools.m
================================================
// Copyright (C) 2014 by Matthew York
//
// 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.
#import "NSDate+DateTools.h"
typedef NS_ENUM(NSUInteger, DTDateComponent){
DTDateComponentEra,
DTDateComponentYear,
DTDateComponentMonth,
DTDateComponentDay,
DTDateComponentHour,
DTDateComponentMinute,
DTDateComponentSecond,
DTDateComponentWeekday,
DTDateComponentWeekdayOrdinal,
DTDateComponentQuarter,
DTDateComponentWeekOfMonth,
DTDateComponentWeekOfYear,
DTDateComponentYearForWeekOfYear,
DTDateComponentDayOfYear
};
typedef NS_ENUM(NSUInteger, DateAgoFormat){
DateAgoLong,
DateAgoLongUsingNumericDatesAndTimes,
DateAgoLongUsingNumericDates,
DateAgoLongUsingNumericTimes,
DateAgoShort,
DateAgoWeek,
};
typedef NS_ENUM(NSUInteger, DateAgoValues){
YearsAgo,
MonthsAgo,
WeeksAgo,
DaysAgo,
HoursAgo,
MinutesAgo,
SecondsAgo
};
static const unsigned int allCalendarUnitFlags = NSCalendarUnitYear | NSCalendarUnitQuarter | NSCalendarUnitMonth | NSCalendarUnitWeekOfYear | NSCalendarUnitWeekOfMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond | NSCalendarUnitEra | NSCalendarUnitWeekday | NSCalendarUnitWeekdayOrdinal | NSCalendarUnitWeekOfYear;
static NSString *defaultCalendarIdentifier = nil;
static NSCalendar *implicitCalendar = nil;
@implementation NSDate (DateTools)
+ (void)load {
[self setDefaultCalendarIdentifier:NSCalendarIdentifierGregorian];
}
#pragma mark - Time Ago
/**
* Takes in a date and returns a string with the most convenient unit of time representing
* how far in the past that date is from now.
*
* @param date - Date to be measured from now
*
* @return NSString - Formatted return string
*/
+ (NSString*)timeAgoSinceDate:(NSDate*)date{
return [date timeAgoSinceDate:[NSDate date]];
}
/**
* Takes in a date and returns a shortened string with the most convenient unit of time representing
* how far in the past that date is from now.
*
* @param date - Date to be measured from now
*
* @return NSString - Formatted return string
*/
+ (NSString*)shortTimeAgoSinceDate:(NSDate*)date{
return [date shortTimeAgoSinceDate:[NSDate date]];
}
+ (NSString*)weekTimeAgoSinceDate:(NSDate*)date{
return [date weekTimeAgoSinceDate:[NSDate date]];
}
/**
* Returns a string with the most convenient unit of time representing
* how far in the past that date is from now.
*
* @return NSString - Formatted return string
*/
- (NSString*)timeAgoSinceNow{
return [self timeAgoSinceDate:[NSDate date]];
}
/**
* Returns a shortened string with the most convenient unit of time representing
* how far in the past that date is from now.
*
* @return NSString - Formatted return string
*/
- (NSString *)shortTimeAgoSinceNow{
return [self shortTimeAgoSinceDate:[NSDate date]];
}
- (NSString *)weekTimeAgoSinceNow{
return [self weekTimeAgoSinceDate:[NSDate date]];
}
- (NSString *)timeAgoSinceDate:(NSDate *)date{
return [self timeAgoSinceDate:date numericDates:NO];
}
- (NSString *)timeAgoSinceDate:(NSDate *)date numericDates:(BOOL)useNumericDates{
return [self timeAgoSinceDate:date numericDates:useNumericDates numericTimes:NO];
}
- (NSString *)timeAgoSinceDate:(NSDate *)date numericDates:(BOOL)useNumericDates numericTimes:(BOOL)useNumericTimes{
if (useNumericDates && useNumericTimes) {
return [self timeAgoSinceDate:date format:DateAgoLongUsingNumericDatesAndTimes];
} else if (useNumericDates) {
return [self timeAgoSinceDate:date format:DateAgoLongUsingNumericDates];
} else if (useNumericTimes) {
return [self timeAgoSinceDate:date format:DateAgoLongUsingNumericDates];
} else {
return [self timeAgoSinceDate:date format:DateAgoLong];
}
}
- (NSString *)shortTimeAgoSinceDate:(NSDate *)date{
return [self timeAgoSinceDate:date format:DateAgoShort];
}
- (NSString *)weekTimeAgoSinceDate:(NSDate *)date{
return [self timeAgoSinceDate:date format:DateAgoWeek];
}
- (NSString *)timeAgoSinceDate:(NSDate *)date format:(DateAgoFormat)format {
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDate *earliest = [self earlierDate:date];
NSDate *latest = (earliest == self) ? date : self;
// if timeAgo < 24h => compare DateTime else compare Date only
NSUInteger upToHours = NSCalendarUnitSecond | NSCalendarUnitMinute | NSCalendarUnitHour;
NSDateComponents *difference = [calendar components:upToHours fromDate:earliest toDate:latest options:0];
if (difference.hour < 24) {
if (difference.hour >= 1) {
return [self localizedStringFor:format valueType:HoursAgo value:difference.hour];
} else if (difference.minute >= 1) {
return [self localizedStringFor:format valueType:MinutesAgo value:difference.minute];
} else {
return [self localizedStringFor:format valueType:SecondsAgo value:difference.second];
}
} else {
NSUInteger bigUnits = NSCalendarUnitTimeZone | NSCalendarUnitDay | NSCalendarUnitWeekOfYear | NSCalendarUnitMonth | NSCalendarUnitYear;
NSDateComponents *components = [calendar components:bigUnits fromDate:earliest];
earliest = [calendar dateFromComponents:components];
components = [calendar components:bigUnits fromDate:latest];
latest = [calendar dateFromComponents:components];
difference = [calendar components:bigUnits fromDate:earliest toDate:latest options:0];
if (difference.year >= 1) {
return [self localizedStringFor:format valueType:YearsAgo value:difference.year];
} else if (difference.month >= 1) {
return [self localizedStringFor:format valueType:MonthsAgo value:difference.month];
} else if (difference.weekOfYear >= 1) {
return [self localizedStringFor:format valueType:WeeksAgo value:difference.weekOfYear];
} else {
return [self localizedStringFor:format valueType:DaysAgo value:difference.day];
}
}
}
- (NSString *)localizedStringFor:(DateAgoFormat)format valueType:(DateAgoValues)valueType value:(NSInteger)value {
BOOL isShort = format == DateAgoShort;
BOOL isNumericDate = format == DateAgoLongUsingNumericDates || format == DateAgoLongUsingNumericDatesAndTimes;
BOOL isNumericTime = format == DateAgoLongUsingNumericTimes || format == DateAgoLongUsingNumericDatesAndTimes;
BOOL isWeek = format == DateAgoWeek;
switch (valueType) {
case YearsAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@y" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@years ago" withValue:value];
} else if (isNumericDate) {
return DateToolsLocalizedStrings(@"1 year ago");
} else {
return DateToolsLocalizedStrings(@"Last year");
}
case MonthsAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@M" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@months ago" withValue:value];
} else if (isNumericDate) {
return DateToolsLocalizedStrings(@"1 month ago");
} else {
return DateToolsLocalizedStrings(@"Last month");
}
case WeeksAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@w" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@weeks ago" withValue:value];
} else if (isNumericDate) {
return DateToolsLocalizedStrings(@"1 week ago");
} else {
return DateToolsLocalizedStrings(@"Last week");
}
case DaysAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@d" withValue:value];
} else if (value >= 2) {
if (isWeek && value <= 7) {
NSDateFormatter *dayDateFormatter = [[NSDateFormatter alloc]init];
dayDateFormatter.dateFormat = @"EEE";
NSString *eee = [dayDateFormatter stringFromDate:self];
return DateToolsLocalizedStrings(eee);
}
return [self logicLocalizedStringFromFormat:@"%%d %@days ago" withValue:value];
} else if (isNumericDate) {
return DateToolsLocalizedStrings(@"1 day ago");
} else {
return DateToolsLocalizedStrings(@"Yesterday");
}
case HoursAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@h" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@hours ago" withValue:value];
} else if (isNumericTime) {
return DateToolsLocalizedStrings(@"1 hour ago");
} else {
return DateToolsLocalizedStrings(@"An hour ago");
}
case MinutesAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@m" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@minutes ago" withValue:value];
} else if (isNumericTime) {
return DateToolsLocalizedStrings(@"1 minute ago");
} else {
return DateToolsLocalizedStrings(@"A minute ago");
}
case SecondsAgo:
if (isShort) {
return [self logicLocalizedStringFromFormat:@"%%d%@s" withValue:value];
} else if (value >= 2) {
return [self logicLocalizedStringFromFormat:@"%%d %@seconds ago" withValue:value];
} else if (isNumericTime) {
return DateToolsLocalizedStrings(@"1 second ago");
} else {
return DateToolsLocalizedStrings(@"Just now");
}
}
return nil;
}
- (NSString *) logicLocalizedStringFromFormat:(NSString *)format withValue:(NSInteger)value{
NSString * localeFormat = [NSString stringWithFormat:format, [self getLocaleFormatUnderscoresWithValue:value]];
return [NSString stringWithFormat:DateToolsLocalizedStrings(localeFormat), value];
}
- (NSString *)getLocaleFormatUnderscoresWithValue:(double)value{
NSString *localeCode = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];
// Russian (ru) and Ukrainian (uk)
if([localeCode isEqualToString:@"ru-RU"] || [localeCode isEqualToString:@"uk"]) {
int XY = (int)floor(value) % 100;
int Y = (int)floor(value) % 10;
if(Y == 0 || Y > 4 || (XY > 10 && XY < 15)) {
return @"";
}
if(Y > 1 && Y < 5 && (XY < 10 || XY > 20)) {
return @"_";
}
if(Y == 1 && XY != 11) {
return @"__";
}
}
// Add more languages here, which are have specific translation rules...
return @"";
}
#pragma mark - Date Components Without Calendar
/**
* Returns the era of the receiver. (0 for BC, 1 for AD for Gregorian)
*
* @return NSInteger
*/
- (NSInteger)era{
return [self componentForDate:self type:DTDateComponentEra calendar:nil];
}
/**
* Returns the year of the receiver.
*
* @return NSInteger
*/
- (NSInteger)year{
return [self componentForDate:self type:DTDateComponentYear calendar:nil];
}
/**
* Returns the month of the year of the receiver.
*
* @return NSInteger
*/
- (NSInteger)month{
return [self componentForDate:self type:DTDateComponentMonth calendar:nil];
}
/**
* Returns the day of the month of the receiver.
*
* @return NSInteger
*/
- (NSInteger)day{
return [self componentForDate:self type:DTDateComponentDay calendar:nil];
}
/**
* Returns the hour of the day of the receiver. (0-24)
*
* @return NSInteger
*/
- (NSInteger)hour{
return [self componentForDate:self type:DTDateComponentHour calendar:nil];
}
/**
* Returns the minute of the receiver. (0-59)
*
* @return NSInteger
*/
- (NSInteger)minute{
return [self componentForDate:self type:DTDateComponentMinute calendar:nil];
}
/**
* Returns the second of the receiver. (0-59)
*
* @return NSInteger
*/
- (NSInteger)second{
return [self componentForDate:self type:DTDateComponentSecond calendar:nil];
}
/**
* Returns the day of the week of the receiver.
*
* @return NSInteger
*/
- (NSInteger)weekday{
return [self componentForDate:self type:DTDateComponentWeekday calendar:nil];
}
/**
* Returns the ordinal for the day of the week of the receiver.
*
* @return NSInteger
*/
- (NSInteger)weekdayOrdinal{
return [self componentForDate:self type:DTDateComponentWeekdayOrdinal calendar:nil];
}
/**
* Returns the quarter of the receiver.
*
* @return NSInteger
*/
- (NSInteger)quarter{
return [self componentForDate:self type:DTDateComponentQuarter calendar:nil];
}
/**
* Returns the week of the month of the receiver.
*
* @return NSInteger
*/
- (NSInteger)weekOfMonth{
return [self componentForDate:self type:DTDateComponentWeekOfMonth calendar:nil];
}
/**
* Returns the week of the year of the receiver.
*
* @return NSInteger
*/
- (NSInteger)weekOfYear{
return [self componentForDate:self type:DTDateComponentWeekOfYear calendar:nil];
}
/**
* I honestly don't know much about this value...
*
* @return NSInteger
*/
- (NSInteger)yearForWeekOfYear{
return [self componentForDate:self type:DTDateComponentYearForWeekOfYear calendar:nil];
}
/**
* Returns how many days are in the month of the receiver.
*
* @return NSInteger
*/
- (NSInteger)daysInMonth{
NSCalendar *calendar = [NSCalendar currentCalendar];
NSRange days = [calendar rangeOfUnit:NSCalendarUnitDay
inUnit:NSCalendarUnitMonth
forDate:self];
return days.length;
}
/**
* Returns the day of the year of the receiver. (1-365 or 1-366 for leap year)
*
* @return NSInteger
*/
- (NSInteger)dayOfYear{
return [self componentForDate:self type:DTDateComponentDayOfYear calendar:nil];
}
/**
* Returns how many days are in the year of the receiver.
*
* @return NSInteger
*/
-(NSInteger)daysInYear{
if (self.isInLeapYear) {
return 366;
}
return 365;
}
/**
* Returns whether the receiver falls in a leap year.
*
* @return NSInteger
*/
-(BOOL)isInLeapYear{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *dateComponents = [calendar components:allCalendarUnitFlags fromDate:self];
if (dateComponents.year%400 == 0){
return YES;
}
else if (dateComponents.year%100 == 0){
return NO;
}
else if (dateComponents.year%4 == 0){
return YES;
}
return NO;
}
- (BOOL)isToday {
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:[NSDate date]];
NSDate *today = [cal dateFromComponents:components];
components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:self];
NSDate *otherDate = [cal dateFromComponents:components];
return [today isEqualToDate:otherDate];
}
- (BOOL)isTomorrow {
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:[[NSDate date] dateByAddingDays:1]];
NSDate *tomorrow = [cal dateFromComponents:components];
components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:self];
NSDate *otherDate = [cal dateFromComponents:components];
return [tomorrow isEqualToDate:otherDate];
}
-(BOOL)isYesterday{
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:[[NSDate date] dateBySubtractingDays:1]];
NSDate *tomorrow = [cal dateFromComponents:components];
components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:self];
NSDate *otherDate = [cal dateFromComponents:components];
return [tomorrow isEqualToDate:otherDate];
}
- (BOOL)isWeekend {
NSCalendar *calendar = [NSCalendar currentCalendar];
NSRange weekdayRange = [calendar maximumRangeOfUnit:NSCalendarUnitWeekday];
NSDateComponents *components = [calendar components:NSCalendarUnitWeekday
fromDate:self];
NSUInteger weekdayOfSomeDate = [components weekday];
BOOL result = NO;
if (weekdayOfSomeDate == weekdayRange.location || weekdayOfSomeDate == weekdayRange.length)
result = YES;
return result;
}
/**
* Returns whether two dates fall on the same day.
*
* @param date NSDate - Date to compare with sender
* @return BOOL - YES if both paramter dates fall on the same day, NO otherwise
*/
-(BOOL)isSameDay:(NSDate *)date {
return [NSDate isSameDay:self asDate:date];
}
/**
* Returns whether two dates fall on the same day.
*
* @param date NSDate - First date to compare
* @param compareDate NSDate - Second date to compare
* @return BOOL - YES if both paramter dates fall on the same day, NO otherwise
*/
+ (BOOL)isSameDay:(NSDate *)date asDate:(NSDate *)compareDate
{
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:date];
NSDate *dateOne = [cal dateFromComponents:components];
components = [cal components:(NSCalendarUnitEra|NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay) fromDate:compareDate];
NSDate *dateTwo = [cal dateFromComponents:components];
return [dateOne isEqualToDate:dateTwo];
}
#pragma mark - Date Components With Calendar
/**
* Returns the era of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the era (0 for BC, 1 for AD for Gregorian)
*/
- (NSInteger)eraWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentEra calendar:calendar];
}
/**
* Returns the year of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the year as an integer
*/
- (NSInteger)yearWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentYear calendar:calendar];
}
/**
* Returns the month of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the month as an integer
*/
- (NSInteger)monthWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentMonth calendar:calendar];
}
/**
* Returns the day of the month of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the day of the month as an integer
*/
- (NSInteger)dayWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentDay calendar:calendar];
}
/**
* Returns the hour of the day of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the hour of the day as an integer
*/
- (NSInteger)hourWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentHour calendar:calendar];
}
/**
* Returns the minute of the hour of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the minute of the hour as an integer
*/
- (NSInteger)minuteWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentMinute calendar:calendar];
}
/**
* Returns the second of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the second as an integer
*/
- (NSInteger)secondWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentSecond calendar:calendar];
}
/**
* Returns the weekday of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the weekday as an integer
*/
- (NSInteger)weekdayWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentWeekday calendar:calendar];
}
/**
* Returns the weekday ordinal of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the weekday ordinal as an integer
*/
- (NSInteger)weekdayOrdinalWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentWeekdayOrdinal calendar:calendar];
}
/**
* Returns the quarter of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the quarter as an integer
*/
- (NSInteger)quarterWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentQuarter calendar:calendar];
}
/**
* Returns the week of the month of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the week of the month as an integer
*/
- (NSInteger)weekOfMonthWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentWeekOfMonth calendar:calendar];
}
/**
* Returns the week of the year of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the week of the year as an integer
*/
- (NSInteger)weekOfYearWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentWeekOfYear calendar:calendar];
}
/**
* Returns the year for week of the year (???) of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the year for week of the year as an integer
*/
- (NSInteger)yearForWeekOfYearWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentYearForWeekOfYear calendar:calendar];
}
/**
* Returns the day of the year of the receiver from a given calendar
*
* @param calendar NSCalendar - The calendar to be used in the calculation
*
* @return NSInteger - represents the day of the year as an integer
*/
- (NSInteger)dayOfYearWithCalendar:(NSCalendar *)calendar{
return [self componentForDate:self type:DTDateComponentDayOfYear calendar:calendar];
}
/**
* Takes in a date, calendar and desired date component and returns the desired NSInteger
* representation for that component
*
* @param date NSDate - The date to be be mined for a desired component
* @param component DTDateComponent - The desired component (i.e. year, day, week, etc)
* @param calendar NSCalendar - The calendar to be used in the processing (Defaults to Gregorian)
*
* @return NSInteger
*/
-(NSInteger)componentForDate:(NSDate *)date type:(DTDateComponent)component calendar:(NSCalendar *)calendar{
if (!calendar) {
calendar = [[self class] implicitCalendar];
}
unsigned int unitFlags = 0;
if (component == DTDateComponentYearForWeekOfYear) {
unitFlags = NSCalendarUnitYear | NSCalendarUnitQuarter | NSCalendarUnitMonth | NSCalendarUnitWeekOfYear | NSCalendarUnitWeekOfMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond | NSCalendarUnitEra | NSCalendarUnitWeekday | NSCalendarUnitWeekdayOrdinal | NSCalendarUnitWeekOfYear | NSCalendarUnitYearForWeekOfYear;
}
else {
unitFlags = allCalendarUnitFlags;
}
NSDateComponents *dateComponents = [calendar components:unitFlags fromDate:date];
switch (component) {
case DTDateComponentEra:
return [dateComponents era];
case DTDateComponentYear:
return [dateComponents year];
case DTDateComponentMonth:
return [dateComponents month];
case DTDateComponentDay:
return [dateComponents day];
case DTDateComponentHour:
return [dateComponents hour];
case DTDateComponentMinute:
return [dateComponents minute];
case DTDateComponentSecond:
return [dateComponents second];
case DTDateComponentWeekday:
return [dateComponents weekday];
case DTDateComponentWeekdayOrdinal:
return [dateComponents weekdayOrdinal];
case DTDateComponentQuarter:
return [dateComponents quarter];
case DTDateComponentWeekOfMonth:
return [dateComponents weekOfMonth];
case DTDateComponentWeekOfYear:
return [dateComponents weekOfYear];
case DTDateComponentYearForWeekOfYear:
return [dateComponents yearForWeekOfYear];
case DTDateComponentDayOfYear:
return [calendar ordinalityOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitYear forDate:date];
default:
break;
}
return 0;
}
#pragma mark - Date Creating
+ (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day {
return [self dateWithYear:year month:month day:day hour:0 minute:0 second:0];
}
+ (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second {
NSDate *nsDate = nil;
NSDateComponents *components = [[NSDateComponents alloc] init];
components.year = year;
components.month = month;
components.day = day;
components.hour = hour;
components.minute = minute;
components.second = second;
nsDate = [[[self class] implicitCalendar] dateFromComponents:components];
return nsDate;
}
+ (NSDate *)dateWithString:(NSString *)dateString formatString:(NSString *)formatString {
return [self dateWithString:dateString formatString:formatString timeZone:[NSTimeZone systemTimeZone]];
}
+ (NSDate *)dateWithString:(NSString *)dateString formatString:(NSString *)formatString timeZone:(NSTimeZone *)timeZone {
static NSDateFormatter *parser = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
parser = [[NSDateFormatter alloc] init];
});
parser.dateStyle = NSDateFormatterNoStyle;
parser.timeStyle = NSDateFormatterNoStyle;
parser.timeZone = timeZone;
parser.dateFormat = formatString;
return [parser dateFromString:dateString];
}
#pragma mark - Date Editing
#pragma mark Date By Adding
/**
* Returns a date representing the receivers date shifted later by the provided number of years.
*
* @param years NSInteger - Number of years to add
*
* @return NSDate - Date modified by the number of desired years
*/
- (NSDate *)dateByAddingYears:(NSInteger)years{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setYear:years];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of months.
*
* @param months NSInteger - Number of months to add
*
* @return NSDate - Date modified by the number of desired months
*/
- (NSDate *)dateByAddingMonths:(NSInteger)months{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setMonth:months];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of weeks.
*
* @param weeks NSInteger - Number of weeks to add
*
* @return NSDate - Date modified by the number of desired weeks
*/
- (NSDate *)dateByAddingWeeks:(NSInteger)weeks{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setWeekOfYear:weeks];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of days.
*
* @param days NSInteger - Number of days to add
*
* @return NSDate - Date modified by the number of desired days
*/
- (NSDate *)dateByAddingDays:(NSInteger)days{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setDay:days];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of hours.
*
* @param hours NSInteger - Number of hours to add
*
* @return NSDate - Date modified by the number of desired hours
*/
- (NSDate *)dateByAddingHours:(NSInteger)hours{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setHour:hours];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of minutes.
*
* @param minutes NSInteger - Number of minutes to add
*
* @return NSDate - Date modified by the number of desired minutes
*/
- (NSDate *)dateByAddingMinutes:(NSInteger)minutes{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setMinute:minutes];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted later by the provided number of seconds.
*
* @param seconds NSInteger - Number of seconds to add
*
* @return NSDate - Date modified by the number of desired seconds
*/
- (NSDate *)dateByAddingSeconds:(NSInteger)seconds{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setSecond:seconds];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
#pragma mark Date By Subtracting
/**
* Returns a date representing the receivers date shifted earlier by the provided number of years.
*
* @param years NSInteger - Number of years to subtract
*
* @return NSDate - Date modified by the number of desired years
*/
- (NSDate *)dateBySubtractingYears:(NSInteger)years{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setYear:-1*years];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of months.
*
* @param months NSInteger - Number of months to subtract
*
* @return NSDate - Date modified by the number of desired months
*/
- (NSDate *)dateBySubtractingMonths:(NSInteger)months{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setMonth:-1*months];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of weeks.
*
* @param weeks NSInteger - Number of weeks to subtract
*
* @return NSDate - Date modified by the number of desired weeks
*/
- (NSDate *)dateBySubtractingWeeks:(NSInteger)weeks{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setWeekOfYear:-1*weeks];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of days.
*
* @param days NSInteger - Number of days to subtract
*
* @return NSDate - Date modified by the number of desired days
*/
- (NSDate *)dateBySubtractingDays:(NSInteger)days{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setDay:-1*days];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of hours.
*
* @param hours NSInteger - Number of hours to subtract
*
* @return NSDate - Date modified by the number of desired hours
*/
- (NSDate *)dateBySubtractingHours:(NSInteger)hours{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setHour:-1*hours];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of minutes.
*
* @param minutes NSInteger - Number of minutes to subtract
*
* @return NSDate - Date modified by the number of desired minutes
*/
- (NSDate *)dateBySubtractingMinutes:(NSInteger)minutes{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setMinute:-1*minutes];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
/**
* Returns a date representing the receivers date shifted earlier by the provided number of seconds.
*
* @param seconds NSInteger - Number of seconds to subtract
*
* @return NSDate - Date modified by the number of desired seconds
*/
- (NSDate *)dateBySubtractingSeconds:(NSInteger)seconds{
NSCalendar *calendar = [[self class] implicitCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
[components setSecond:-1*seconds];
return [calendar dateByAddingComponents:components toDate:self options:0];
}
#pragma mark - Date Comparison
#pragma mark Time From
/**
* Returns an NSInteger representing the amount of time in years between the receiver and the provided date.
* If the receiver is earlier than the provided date, the returned value will be negative.
* Uses the default Gregorian calendar
*
* @param date NSDate - The provided date for comparison
*
* @return NSInteger - The NSInteger representation of the years between receiver and provided date
*/
-(NSInteger)yearsFrom:(NSDate *)date{
return [self yearsFrom:date calendar:nil];
}
/**
* Returns an NSInteger representing the amount of time in months between the receiver and the provided date.
* If the receiver is earlier than the provided date, the returned value will be negative.
* Uses the default Gregorian calendar
*
* @param date NSDate - The provided date for comparison
*
* @return NSInteger - The NSInteger representation of the years between receiver and provided date
*/
-(NSInteger)monthsFrom:(NSDate *)date{
return [self monthsFrom:date calendar:nil];
}
/**
* Returns an NSInteger representing the amount of time in weeks between the receiver and the provided date.
* If the receiver is earlier than the provided date, the returned value will be negative.
* Uses the default Gregorian calendar
*
* @param date NSDate - The provided date for comparison
*
* @return NSInteger - The double representation of the weeks between receiver and provided date
*/
-(NSInteger)weeksFrom:(NSDate *)date{
return [self weeksFrom:date calendar:nil];
}
/**
* Returns an NSInteger representing the amount of time in days between the receiver and the provided date.
gitextract_pjza5tl6/ ├── .gitignore ├── .swift-version ├── .travis.yml ├── CREDITS.md ├── DateTools/ │ ├── DateTools/ │ │ ├── DTConstants.h │ │ ├── DTConstants.m │ │ ├── DTError.h │ │ ├── DTError.m │ │ ├── DTTimePeriod.h │ │ ├── DTTimePeriod.m │ │ ├── DTTimePeriodChain.h │ │ ├── DTTimePeriodChain.m │ │ ├── DTTimePeriodCollection.h │ │ ├── DTTimePeriodCollection.m │ │ ├── DTTimePeriodGroup.h │ │ ├── DTTimePeriodGroup.m │ │ ├── DateTools.bundle/ │ │ │ ├── am.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ar.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── bg.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ca.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── cs.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── cy.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── da.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── de.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── en.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── es.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── eu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── fi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── fr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── gre.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── gu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── he.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── id.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── is.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── it.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ja.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ko.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── lv.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ms.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── nb.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── nl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pt-PT.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pt.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ro.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ru.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── sk.lproj/ │ │ │ │ └── NSDateTimeAgo.strings │ │ │ ├── sl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── sv.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── th.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── tr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── uk.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── vi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── zh-Hans.lproj/ │ │ │ │ └── DateTools.strings │ │ │ └── zh-Hant.lproj/ │ │ │ └── DateTools.strings │ │ ├── DateTools.h │ │ ├── NSDate+DateTools.h │ │ └── NSDate+DateTools.m │ ├── Examples/ │ │ └── DateToolsExample/ │ │ ├── DateTools/ │ │ │ └── Info.plist │ │ ├── DateTools macOS/ │ │ │ ├── DateTools macOS.h │ │ │ └── Info.plist │ │ ├── DateToolsExample/ │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Colours.h │ │ │ ├── Colours.m │ │ │ ├── DateToolsExample-Info.plist │ │ │ ├── DateToolsExample-Prefix.pch │ │ │ ├── DateToolsViewController.h │ │ │ ├── DateToolsViewController.m │ │ │ ├── DateToolsViewController.xib │ │ │ ├── ExampleNavigationController.h │ │ │ ├── ExampleNavigationController.m │ │ │ ├── Images.xcassets/ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ └── Contents.json │ │ │ │ └── LaunchImage.launchimage/ │ │ │ │ └── Contents.json │ │ │ ├── TimePeriodsViewController.h │ │ │ ├── TimePeriodsViewController.m │ │ │ ├── TimePeriodsViewController.xib │ │ │ ├── en.lproj/ │ │ │ │ └── InfoPlist.strings │ │ │ └── main.m │ │ ├── DateToolsExample.xcodeproj/ │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace/ │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata/ │ │ │ └── xcschemes/ │ │ │ ├── DateTools macOS.xcscheme │ │ │ └── DateTools.xcscheme │ │ └── DateToolsExampleTests/ │ │ ├── DateToolsExampleTests-Info.plist │ │ └── en.lproj/ │ │ └── InfoPlist.strings │ └── Tests/ │ └── DateToolsTests/ │ ├── DateToolsTests/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj/ │ │ │ └── Main.storyboard │ │ ├── DateToolsTests-Info.plist │ │ ├── DateToolsTests-Prefix.pch │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage/ │ │ │ └── Contents.json │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ ├── es.lproj/ │ │ │ ├── InfoPlist.strings │ │ │ └── Main.strings │ │ ├── ja.lproj/ │ │ │ ├── InfoPlist.strings │ │ │ └── Main.strings │ │ └── main.m │ ├── DateToolsTests.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ ├── DateToolsTests.xcscheme │ │ └── DateToolsTestsTests.xcscheme │ └── DateToolsTestsTests/ │ ├── DTTimeAgoTests.m │ ├── DTTimePeriodChainTests.m │ ├── DTTimePeriodCollectionTests.m │ ├── DTTimePeriodGroupTests.m │ ├── DTTimePeriodTests.m │ ├── DateToolsTests.m │ ├── DateToolsTestsTests-Info.plist │ ├── en.lproj/ │ │ └── InfoPlist.strings │ ├── es.lproj/ │ │ └── InfoPlist.strings │ └── ja.lproj/ │ └── InfoPlist.strings ├── DateTools.podspec ├── DateToolsSwift/ │ ├── DateTools/ │ │ ├── Constants.swift │ │ ├── Date+Bundle.swift │ │ ├── Date+Comparators.swift │ │ ├── Date+Components.swift │ │ ├── Date+Format.swift │ │ ├── Date+Inits.swift │ │ ├── Date+Manipulations.swift │ │ ├── Date+TimeAgo.swift │ │ ├── DateTools.bundle/ │ │ │ ├── am.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ar.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── bg.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ca.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── cs.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── cy.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── da.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── de.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── en.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── es.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── eu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── fi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── fr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── gre.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── gu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── he.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── hu.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── id.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── is.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── it.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ja.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ko.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── lv.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ms.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── nb.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── nl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pt-PT.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── pt.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ro.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── ru.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── sk.lproj/ │ │ │ │ └── NSDateTimeAgo.strings │ │ │ ├── sl.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── sv.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── th.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── tr.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── uk.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── vi.lproj/ │ │ │ │ └── DateTools.strings │ │ │ ├── zh-Hans.lproj/ │ │ │ │ └── DateTools.strings │ │ │ └── zh-Hant.lproj/ │ │ │ └── DateTools.strings │ │ ├── Enums.swift │ │ ├── Integer+DateTools.swift │ │ ├── TimeChunk.swift │ │ ├── TimePeriod.swift │ │ ├── TimePeriodChain.swift │ │ ├── TimePeriodCollection.swift │ │ └── TimePeriodGroup.swift │ ├── Examples/ │ │ └── DateToolsExample/ │ │ ├── DateToolsExample/ │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets/ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── first.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ └── second.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── Base.lproj/ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── Main.storyboard │ │ │ ├── ExtensionsViewController.swift │ │ │ ├── Info.plist │ │ │ └── TimePeriodsViewController.swift │ │ ├── DateToolsExample.xcodeproj/ │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ ├── DateToolsExampleTests/ │ │ │ ├── DateToolsExampleTests.swift │ │ │ └── Info.plist │ │ └── DateToolsExampleUITests/ │ │ ├── DateToolsExampleUITests.swift │ │ └── Info.plist │ ├── Tests/ │ │ └── DateToolsTests/ │ │ ├── DateToolsTests/ │ │ │ ├── AppDelegate.swift │ │ │ ├── Assets.xcassets/ │ │ │ │ └── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Base.lproj/ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── ViewController.swift │ │ ├── DateToolsTests.xcodeproj/ │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── DateToolsTestsTests/ │ │ ├── DateComparatorsExtensionTests.swift │ │ ├── DateComponentsExtensionTests.swift │ │ ├── DateFormatExtensionTests.swift │ │ ├── DateInitsExtensionTests.swift │ │ ├── DateManipulationsExtensionTests.swift │ │ ├── DateTimeAgoExtensionTests.swift │ │ ├── Info.plist │ │ ├── IntegerExtensionTests.swift │ │ ├── TimeAgoTests.swift │ │ ├── TimeChunkTests.swift │ │ ├── TimePeriodChainTests.swift │ │ ├── TimePeriodCollection.swift │ │ ├── TimePeriodCollectionTests.swift │ │ ├── TimePeriodGroupTests.swift │ │ └── TimePeriodTests.swift │ └── doc_gen.sh ├── DateToolsSwift.podspec ├── Examples/ │ └── DateToolsExample/ │ ├── DateTools macOS/ │ │ ├── DateTools macOS.h │ │ └── Info.plist │ └── DateToolsExample.xcodeproj/ │ └── xcshareddata/ │ └── xcschemes/ │ └── DateTools macOS.xcscheme ├── LICENSE ├── Package.swift └── README.md
SYMBOL INDEX (9 symbols across 4 files)
FILE: DateTools/DateTools/DTTimePeriod.h
type DTTimePeriodRelationAfter (line 26) | typedef NS_ENUM(NSUInteger, DTTimePeriodRelation){
type DTTimePeriodSizeSecond (line 43) | typedef NS_ENUM(NSUInteger, DTTimePeriodSize) {
type DTTimePeriodIntervalOpen (line 53) | typedef NS_ENUM(NSUInteger, DTTimePeriodInterval) {
type DTTimePeriodAnchorStart (line 58) | typedef NS_ENUM(NSUInteger, DTTimePeriodAnchor) {
FILE: DateTools/DateTools/DTTimePeriodChain.h
function interface (line 26) | interface DTTimePeriodChain : DTTimePeriodGroup {
FILE: DateTools/DateTools/DTTimePeriodGroup.h
function interface (line 26) | interface DTTimePeriodGroup : NSObject {
FILE: DateTools/Examples/DateToolsExample/DateToolsExample/Colours.h
type ColorSchemeAnalagous (line 61) | typedef NS_ENUM(NSInteger, ColorScheme) {
type ColorFormulationRGBA (line 69) | typedef NS_ENUM(NSInteger, ColorFormulation) {
type ColorDistanceCIE76 (line 77) | typedef NS_ENUM(NSInteger, ColorDistance) {
Condensed preview — 221 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,112K chars).
[
{
"path": ".gitignore",
"chars": 245,
"preview": "# Xcode\n.DS_Store\n*/build/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspecti"
},
{
"path": ".swift-version",
"chars": 4,
"preview": "5.0\n"
},
{
"path": ".travis.yml",
"chars": 196,
"preview": "language: swift\n\nbefore_script: \n- gem install xcpretty\n\nscript: \n- xcodebuild -project Tests/DateToolsTests/DateToolsTe"
},
{
"path": "CREDITS.md",
"chars": 2758,
"preview": "Credits\n=======\n\nPortions from NSDate+TimeAgo Originally based on code Christopher Pickslay posted to Forrst. Used with "
},
{
"path": "DateTools/DateTools/DTConstants.h",
"chars": 1705,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTConstants.m",
"chars": 1585,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTError.h",
"chars": 1674,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTError.m",
"chars": 3810,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriod.h",
"chars": 4761,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriod.m",
"chars": 22707,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodChain.h",
"chars": 1880,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodChain.m",
"chars": 7212,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodCollection.h",
"chars": 2278,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodCollection.m",
"chars": 12966,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodGroup.h",
"chars": 2302,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DTTimePeriodGroup.m",
"chars": 6087,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/DateTools.bundle/am.lproj/DateTools.strings",
"chars": 2048,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d ቀናት በፊት\";\n\n/* No comment provided by engineer. */\n\"%d hours a"
},
{
"path": "DateTools/DateTools/DateTools.bundle/bg.lproj/DateTools.strings",
"chars": 1742,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"преди %d дена\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/ca.lproj/DateTools.strings",
"chars": 1695,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Fa %d dies\";\n\n/* No comment provided by engineer. */\n\"%d hours a"
},
{
"path": "DateTools/DateTools/DateTools.bundle/cs.lproj/DateTools.strings",
"chars": 1893,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Před %d dny\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateTools/DateTools/DateTools.bundle/cy.lproj/DateTools.strings",
"chars": 1715,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d diwrnod yn ôl\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateTools/DateTools/DateTools.bundle/da.lproj/DateTools.strings",
"chars": 1737,
"preview": "/* No comment provided by engineer. */\n \"%d days ago\" = \"%d dage siden\";\n \n /* No comment provided by engineer. */\n \"%d "
},
{
"path": "DateTools/DateTools/DateTools.bundle/de.lproj/DateTools.strings",
"chars": 1935,
"preview": "/* No comment provided by engineer. */\n \"%d days ago\" = \"Vor %d Tagen\";\n \n /* No comment provided by engineer. */\n \"%d h"
},
{
"path": "DateTools/DateTools/DateTools.bundle/en.lproj/DateTools.strings",
"chars": 2315,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d days ago\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateTools/DateTools/DateTools.bundle/es.lproj/DateTools.strings",
"chars": 1968,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Hace %d días\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateTools/DateTools/DateTools.bundle/eu.lproj/DateTools.strings",
"chars": 1810,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Orain dela %d egun\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateTools/DateTools/DateTools.bundle/fi.lproj/DateTools.strings",
"chars": 1759,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d päivää sitten\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateTools/DateTools/DateTools.bundle/fr.lproj/DateTools.strings",
"chars": 1985,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Il y a %d jours\";\n\n/* No comment provided by engineer. */\n\"%d ho"
},
{
"path": "DateTools/DateTools/DateTools.bundle/gu.lproj/DateTools.strings",
"chars": 2108,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d દિવસ પહેલા\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/he.lproj/DateTools.strings",
"chars": 1643,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"לפני %d ימים\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateTools/DateTools/DateTools.bundle/hi.lproj/DateTools.strings",
"chars": 2065,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d दिन पहले\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateTools/DateTools/DateTools.bundle/hr.lproj/DateTools.strings",
"chars": 1123,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dana\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\""
},
{
"path": "DateTools/DateTools/DateTools.bundle/hu.lproj/DateTools.strings",
"chars": 1662,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d napja\";\n\n/* No comment provided by engineer. */\n\"%d hours ago"
},
{
"path": "DateTools/DateTools/DateTools.bundle/id.lproj/DateTools.strings",
"chars": 1752,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d hari yang lalu\";\n\n/* No comment provided by engineer. */\n\"%d "
},
{
"path": "DateTools/DateTools/DateTools.bundle/is.lproj/DateTools.strings",
"chars": 1739,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dögum síðan\";\n\n/* No comment provided by engineer. */\n\"%d hou"
},
{
"path": "DateTools/DateTools/DateTools.bundle/it.lproj/DateTools.strings",
"chars": 1705,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d giorni fa\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateTools/DateTools/DateTools.bundle/ja.lproj/DateTools.strings",
"chars": 1888,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d日前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateTools/DateTools/DateTools.bundle/ko.lproj/DateTools.strings",
"chars": 1533,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d일 전\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" ="
},
{
"path": "DateTools/DateTools/DateTools.bundle/lv.lproj/DateTools.strings",
"chars": 756,
"preview": "\"1 year ago\" = \"Pirms gada\";\n\"1 month ago\" = \"Pirms mēneša\";\n\"1 week ago\" = \"Pirms nedēļas\";\n\"1 day ago\" = \"Pirms dienas"
},
{
"path": "DateTools/DateTools/DateTools.bundle/ms.lproj/DateTools.strings",
"chars": 2160,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d hari yang lepas\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateTools/DateTools/DateTools.bundle/nb.lproj/DateTools.strings",
"chars": 2676,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateTools/DateTools/DateTools.bundle/nl.lproj/DateTools.strings",
"chars": 1735,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dagen geleden\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateTools/DateTools/DateTools.bundle/pl.lproj/DateTools.strings",
"chars": 1754,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dni temu\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateTools/DateTools/DateTools.bundle/pt-PT.lproj/DateTools.strings",
"chars": 1714,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dias atrás\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/pt.lproj/DateTools.strings",
"chars": 1700,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dias atrás\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/ro.lproj/DateTools.strings",
"chars": 2050,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"În urmă cu %d zile\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateTools/DateTools/DateTools.bundle/ru.lproj/DateTools.strings",
"chars": 2978,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateTools/DateTools/DateTools.bundle/sk.lproj/NSDateTimeAgo.strings",
"chars": 1723,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Pred %d dňami\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/sl.lproj/DateTools.strings",
"chars": 2110,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"pred %d dnevi\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/tr.lproj/DateTools.strings",
"chars": 1858,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d gün önce\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateTools/DateTools/DateTools.bundle/uk.lproj/DateTools.strings",
"chars": 2964,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateTools/DateTools/DateTools.bundle/vi.lproj/DateTools.strings",
"chars": 1692,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d ngày trước\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateTools/DateTools/DateTools.bundle/zh-Hans.lproj/DateTools.strings",
"chars": 2033,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d天前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateTools/DateTools/DateTools.bundle/zh-Hant.lproj/DateTools.strings",
"chars": 1929,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d天前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateTools/DateTools/DateTools.h",
"chars": 1312,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/NSDate+DateTools.h",
"chars": 7840,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/DateTools/NSDate+DateTools.m",
"chars": 60469,
"preview": "// Copyright (C) 2014 by Matthew York\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining a c"
},
{
"path": "DateTools/Examples/DateToolsExample/DateTools/Info.plist",
"chars": 806,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Examples/DateToolsExample/DateTools macOS/DateTools macOS.h",
"chars": 488,
"preview": "//\n// DateTools macOS.h\n// DateTools macOS\n//\n// Created by Tom Baranes on 22/09/2016.\n//\n//\n\n#import <Cocoa/Cocoa.h>"
},
{
"path": "DateTools/Examples/DateToolsExample/DateTools macOS/Info.plist",
"chars": 753,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/AppDelegate.h",
"chars": 300,
"preview": "//\n// AppDelegate.h\n// DateToolsExample\n//\n// Created by Matthew York on 3/19/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@in"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/AppDelegate.m",
"chars": 3316,
"preview": "//\n// AppDelegate.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/19/14.\n//\n//\n\n#import \"AppDelegate.h\"\n#imp"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/Colours.h",
"chars": 12754,
"preview": "// Copyright (C) 2013 by Benjamin Gordon\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining "
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/Colours.m",
"chars": 35580,
"preview": "// Copyright (C) 2013 by Benjamin Gordon\n//\n// Permission is hereby granted, free of charge, to any\n// person obtaining "
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/DateToolsExample-Info.plist",
"chars": 1040,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/DateToolsExample-Prefix.pch",
"chars": 344,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/DateToolsViewController.h",
"chars": 189,
"preview": "//\n// DateToolsViewController.h\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIKit/U"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/DateToolsViewController.m",
"chars": 4314,
"preview": "//\n// DateToolsViewController.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import \"DateToo"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/DateToolsViewController.xib",
"chars": 15493,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/ExampleNavigationController.h",
"chars": 203,
"preview": "//\n// ExampleNavigationController.h\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIK"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/ExampleNavigationController.m",
"chars": 1277,
"preview": "//\n// ExampleNavigationController.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import \"Exa"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 333,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/Images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 442,
"preview": "{\n \"images\" : [\n {\n \"orientation\" : \"portrait\",\n \"idiom\" : \"iphone\",\n \"extent\" : \"full-screen\",\n "
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/TimePeriodsViewController.h",
"chars": 193,
"preview": "//\n// TimePeriodsViewController.h\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIKit"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/TimePeriodsViewController.m",
"chars": 7992,
"preview": "//\n// TimePeriodsViewController.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import \"TimeP"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/TimePeriodsViewController.xib",
"chars": 16057,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample/main.m",
"chars": 293,
"preview": "//\n// main.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/19/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"A"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample.xcodeproj/project.pbxproj",
"chars": 56088,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 161,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DateToolsExampl"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample.xcodeproj/xcshareddata/xcschemes/DateTools macOS.xcscheme",
"chars": 2907,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0800\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExample.xcodeproj/xcshareddata/xcschemes/DateTools.xcscheme",
"chars": 5481,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0800\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExampleTests/DateToolsExampleTests-Info.plist",
"chars": 674,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Examples/DateToolsExample/DateToolsExampleTests/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/AppDelegate.h",
"chars": 231,
"preview": "//\n// AppDelegate.h\n// DateToolsTests\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@inte"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/AppDelegate.m",
"chars": 1961,
"preview": "//\n// AppDelegate.m\n// DateToolsTests\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import \"AppDelegate.h\"\n\n@impl"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/Base.lproj/Main.storyboard",
"chars": 1819,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/DateToolsTests-Info.plist",
"chars": 1225,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/DateToolsTests-Prefix.pch",
"chars": 344,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 333,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/Images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 442,
"preview": "{\n \"images\" : [\n {\n \"orientation\" : \"portrait\",\n \"idiom\" : \"iphone\",\n \"extent\" : \"full-screen\",\n "
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/ViewController.h",
"chars": 169,
"preview": "//\n// ViewController.h\n// DateToolsTests\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n@i"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/ViewController.m",
"chars": 2262,
"preview": "//\n// ViewController.m\n// DateToolsTests\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import \"ViewController.h\"\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/es.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/es.lproj/Main.strings",
"chars": 0,
"preview": ""
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/ja.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/ja.lproj/Main.strings",
"chars": 0,
"preview": ""
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests/main.m",
"chars": 291,
"preview": "//\n// main.m\n// DateToolsTests\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"App"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests.xcodeproj/project.pbxproj",
"chars": 29760,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DateToolsTests."
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests.xcodeproj/xcshareddata/xcschemes/DateToolsTests.xcscheme",
"chars": 3670,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0510\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTests.xcodeproj/xcshareddata/xcschemes/DateToolsTestsTests.xcscheme",
"chars": 2395,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0510\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DTTimeAgoTests.m",
"chars": 6008,
"preview": "//\n// DTTimeAgoTests.m\n// DateToolsTests\n//\n// Created by kevin on 2014.04.05.\n//\n//\n\n#import <XCTest/XCTest.h>\n#impo"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DTTimePeriodChainTests.m",
"chars": 11637,
"preview": "//\n// DTTimePeriodChainTests.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/21/14.\n//\n//\n\n#import <XCTest/X"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DTTimePeriodCollectionTests.m",
"chars": 25347,
"preview": "//\n// DTTimePeriodCollectionTests.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/21/14.\n//\n//\n\n#import <XCT"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DTTimePeriodGroupTests.m",
"chars": 4982,
"preview": "//\n// DTTimePeriodGroupTests.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/22/14.\n//\n//\n\n#import <XCTest/X"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DTTimePeriodTests.m",
"chars": 45692,
"preview": "//\n// DTTimePeriodTests.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/19/14.\n//\n//\n\n#import <XCTest/XCTest"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DateToolsTests.m",
"chars": 33525,
"preview": "//\n// DateToolsTests.m\n// DateToolsExample\n//\n// Created by Matthew York on 3/19/14.\n//\n//\n\n#import <XCTest/XCTest.h>"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/DateToolsTestsTests-Info.plist",
"chars": 692,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/es.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools/Tests/DateToolsTests/DateToolsTestsTests/ja.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "DateTools.podspec",
"chars": 728,
"preview": "Pod::Spec.new do |s|\n s.name = 'DateTools'\n s.version = '2.0.0'\n s.summary = 'Dates and time made e"
},
{
"path": "DateToolsSwift/DateTools/Constants.swift",
"chars": 1122,
"preview": "//\n// Constants.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson Webster."
},
{
"path": "DateToolsSwift/DateTools/Date+Bundle.swift",
"chars": 572,
"preview": "//\n// Date+Bundle.swift\n// DateTools\n//\n// Created by Matthew York on 8/26/16.\n// Copyright © 2016 Matthew York. All"
},
{
"path": "DateToolsSwift/DateTools/Date+Comparators.swift",
"chars": 21931,
"preview": "//\n// Date+Comparators.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/26/16.\n// Copyright © 2016 Matthew"
},
{
"path": "DateToolsSwift/DateTools/Date+Components.swift",
"chars": 9749,
"preview": "//\n// Date+Components.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/26/16.\n// Copyright © 2016 Matthew "
},
{
"path": "DateToolsSwift/DateTools/Date+Format.swift",
"chars": 6035,
"preview": "//\n// Date+Format.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/23/16.\n// Copyright © 2016 Matthew York"
},
{
"path": "DateToolsSwift/DateTools/Date+Inits.swift",
"chars": 2745,
"preview": "//\n// Date+DateTools.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson Web"
},
{
"path": "DateToolsSwift/DateTools/Date+Manipulations.swift",
"chars": 6079,
"preview": "//\n// Date+Manipulations.swift\n// DateToolsTests\n//\n// Created by Grayson Webster on 9/28/16.\n// Copyright © 2016 Ma"
},
{
"path": "DateToolsSwift/DateTools/Date+TimeAgo.swift",
"chars": 10414,
"preview": "//\n// Date+TimeAgo.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/23/16.\n// Copyright © 2016 Matthew Yor"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/am.lproj/DateTools.strings",
"chars": 2048,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d ቀናት በፊት\";\n\n/* No comment provided by engineer. */\n\"%d hours a"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/bg.lproj/DateTools.strings",
"chars": 1742,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"преди %d дена\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ca.lproj/DateTools.strings",
"chars": 1695,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Fa %d dies\";\n\n/* No comment provided by engineer. */\n\"%d hours a"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/cs.lproj/DateTools.strings",
"chars": 1893,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Před %d dny\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/cy.lproj/DateTools.strings",
"chars": 1715,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d diwrnod yn ôl\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/da.lproj/DateTools.strings",
"chars": 1737,
"preview": "/* No comment provided by engineer. */\n \"%d days ago\" = \"%d dage siden\";\n \n /* No comment provided by engineer. */\n \"%d "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/de.lproj/DateTools.strings",
"chars": 1935,
"preview": "/* No comment provided by engineer. */\n \"%d days ago\" = \"Vor %d Tagen\";\n \n /* No comment provided by engineer. */\n \"%d h"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/en.lproj/DateTools.strings",
"chars": 2315,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d days ago\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/es.lproj/DateTools.strings",
"chars": 1968,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Hace %d días\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/eu.lproj/DateTools.strings",
"chars": 1810,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Orain dela %d egun\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/fi.lproj/DateTools.strings",
"chars": 1759,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d päivää sitten\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/fr.lproj/DateTools.strings",
"chars": 1985,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Il y a %d jours\";\n\n/* No comment provided by engineer. */\n\"%d ho"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/gu.lproj/DateTools.strings",
"chars": 2108,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d દિવસ પહેલા\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/he.lproj/DateTools.strings",
"chars": 1643,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"לפני %d ימים\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/hi.lproj/DateTools.strings",
"chars": 2065,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d दिन पहले\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/hr.lproj/DateTools.strings",
"chars": 1123,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dana\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\""
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/hu.lproj/DateTools.strings",
"chars": 1662,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d napja\";\n\n/* No comment provided by engineer. */\n\"%d hours ago"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/id.lproj/DateTools.strings",
"chars": 1752,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d hari yang lalu\";\n\n/* No comment provided by engineer. */\n\"%d "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/is.lproj/DateTools.strings",
"chars": 1739,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dögum síðan\";\n\n/* No comment provided by engineer. */\n\"%d hou"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/it.lproj/DateTools.strings",
"chars": 1705,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d giorni fa\";\n\n/* No comment provided by engineer. */\n\"%d hours"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ja.lproj/DateTools.strings",
"chars": 1888,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d日前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ko.lproj/DateTools.strings",
"chars": 1533,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d일 전\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" ="
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/lv.lproj/DateTools.strings",
"chars": 756,
"preview": "\"1 year ago\" = \"Pirms gada\";\n\"1 month ago\" = \"Pirms mēneša\";\n\"1 week ago\" = \"Pirms nedēļas\";\n\"1 day ago\" = \"Pirms dienas"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ms.lproj/DateTools.strings",
"chars": 2160,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d hari yang lepas\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/nb.lproj/DateTools.strings",
"chars": 2676,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/nl.lproj/DateTools.strings",
"chars": 1735,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dagen geleden\";\n\n/* No comment provided by engineer. */\n\"%d h"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/pl.lproj/DateTools.strings",
"chars": 1754,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dni temu\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/pt-PT.lproj/DateTools.strings",
"chars": 1714,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dias atrás\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/pt.lproj/DateTools.strings",
"chars": 1700,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d dias atrás\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ro.lproj/DateTools.strings",
"chars": 2050,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"În urmă cu %d zile\";\n\n/* No comment provided by engineer. */\n\"%d"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/ru.lproj/DateTools.strings",
"chars": 2978,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/sk.lproj/NSDateTimeAgo.strings",
"chars": 1723,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"Pred %d dňami\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/sl.lproj/DateTools.strings",
"chars": 2110,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"pred %d dnevi\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/tr.lproj/DateTools.strings",
"chars": 1858,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d gün önce\";\n\n/* No comment provided by engineer. */\n\"%d hours "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/uk.lproj/DateTools.strings",
"chars": 2964,
"preview": "/*\n RULES:\n Assume value for (seconds, hours, minutes, days, weeks, months or years) is XXXY, Y is last digit, XY is las"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/vi.lproj/DateTools.strings",
"chars": 1692,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d ngày trước\";\n\n/* No comment provided by engineer. */\n\"%d hour"
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/zh-Hans.lproj/DateTools.strings",
"chars": 2033,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d天前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateToolsSwift/DateTools/DateTools.bundle/zh-Hant.lproj/DateTools.strings",
"chars": 1929,
"preview": "/* No comment provided by engineer. */\n\"%d days ago\" = \"%d天前\";\n\n/* No comment provided by engineer. */\n\"%d hours ago\" = "
},
{
"path": "DateToolsSwift/DateTools/Enums.swift",
"chars": 2270,
"preview": "//\n// Enums.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/26/16.\n// Copyright © 2016 Matthew York. All "
},
{
"path": "DateToolsSwift/DateTools/Integer+DateTools.swift",
"chars": 1830,
"preview": "//\n// Integer+DateTools.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson "
},
{
"path": "DateToolsSwift/DateTools/TimeChunk.swift",
"chars": 9485,
"preview": "//\n// TimeChunk.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/19/16.\n// Copyright © 2016 Grayson Webster."
},
{
"path": "DateToolsSwift/DateTools/TimePeriod.swift",
"chars": 24324,
"preview": "//\n// TimePeriod.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson Webster"
},
{
"path": "DateToolsSwift/DateTools/TimePeriodChain.swift",
"chars": 6011,
"preview": "//\n// TimePeriodChain.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson We"
},
{
"path": "DateToolsSwift/DateTools/TimePeriodCollection.swift",
"chars": 9065,
"preview": "//\n// TimePeriodCollection.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grays"
},
{
"path": "DateToolsSwift/DateTools/TimePeriodGroup.swift",
"chars": 5028,
"preview": "//\n// TimePeriodGroup.swift\n// DateTools\n//\n// Created by Grayson Webster on 8/17/16.\n// Copyright © 2016 Grayson We"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/AppDelegate.swift",
"chars": 2182,
"preview": "//\n// AppDelegate.swift\n// DateToolsExample\n//\n// Created by Grayson Webster on 10/21/16.\n// Copyright © 2016 Matt Y"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 585,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Assets.xcassets/first.imageset/Contents.json",
"chars": 154,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"first.pdf\"\n }\n ],\n \"info\" : {\n \"version\""
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Assets.xcassets/second.imageset/Contents.json",
"chars": 155,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"second.pdf\"\n }\n ],\n \"info\" : {\n \"version"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Base.lproj/LaunchScreen.storyboard",
"chars": 1764,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Base.lproj/Main.storyboard",
"chars": 43043,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/ExtensionsViewController.swift",
"chars": 1640,
"preview": "//\n// FirstViewController.swift\n// DateToolsExample\n//\n// Created by Grayson Webster on 10/21/16.\n// Copyright © 201"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/Info.plist",
"chars": 1240,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample/TimePeriodsViewController.swift",
"chars": 4284,
"preview": "//\n// SecondViewController.swift\n// DateToolsExample\n//\n// Created by Grayson Webster on 10/21/16.\n// Copyright © 20"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample.xcodeproj/project.pbxproj",
"chars": 29940,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 161,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DateToolsExampl"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExampleTests/DateToolsExampleTests.swift",
"chars": 1007,
"preview": "//\n// DateToolsExampleTests.swift\n// DateToolsExampleTests\n//\n// Created by Grayson Webster on 10/21/16.\n// Copyrigh"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExampleTests/Info.plist",
"chars": 680,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExampleUITests/DateToolsExampleUITests.swift",
"chars": 1271,
"preview": "//\n// DateToolsExampleUITests.swift\n// DateToolsExampleUITests\n//\n// Created by Grayson Webster on 10/21/16.\n// Copy"
},
{
"path": "DateToolsSwift/Examples/DateToolsExample/DateToolsExampleUITests/Info.plist",
"chars": 680,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/AppDelegate.swift",
"chars": 2180,
"preview": "//\n// AppDelegate.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/19/16.\n// Copyright © 2016 Matthew York"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1495,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"20x20\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/Base.lproj/LaunchScreen.storyboard",
"chars": 1740,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/Base.lproj/Main.storyboard",
"chars": 1695,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/Info.plist",
"chars": 1442,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests/ViewController.swift",
"chars": 706,
"preview": "//\n// ViewController.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/19/16.\n// Copyright © 2016 Matthew Y"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests.xcodeproj/project.pbxproj",
"chars": 32321,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:DateToolsTests."
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateComparatorsExtensionTests.swift",
"chars": 29255,
"preview": "//\n// DateComparators.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Matthew "
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateComponentsExtensionTests.swift",
"chars": 8519,
"preview": "//\n// DateComponents.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Matthew Y"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateFormatExtensionTests.swift",
"chars": 3184,
"preview": "//\n// DateFormatTests.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Matthew "
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateInitsExtensionTests.swift",
"chars": 1593,
"preview": "//\n// DateDateToolsTests.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Matth"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateManipulationsExtensionTests.swift",
"chars": 4909,
"preview": "//\n// DateManipulationsExtensionTests.swift\n// DateToolsTests\n//\n// Created by Grayson Webster on 9/30/16.\n// Copyri"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/DateTimeAgoExtensionTests.swift",
"chars": 1954,
"preview": "//\n// DateTimeAgoTests.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Matthew"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/Info.plist",
"chars": 733,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/IntegerExtensionTests.swift",
"chars": 2316,
"preview": "//\n// IntegerExtensionTests.swift\n// DateToolsTests\n//\n// Created by Matthew York on 8/29/16.\n// Copyright © 2016 Ma"
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/TimeAgoTests.swift",
"chars": 6254,
"preview": "//\n// TimeAgoTests.swift\n// DateToolsTests\n//\n// Created by Grayson Webster on 8/19/16.\n// Copyright © 2016 Matthew "
},
{
"path": "DateToolsSwift/Tests/DateToolsTests/DateToolsTestsTests/TimeChunkTests.swift",
"chars": 11400,
"preview": "//\n// TimeChunkTests.swift\n// DateToolsTests\n//\n// Created by Grayson Webster on 8/26/16.\n// Copyright © 2016 Matthe"
}
]
// ... and 21 more files (download for full content)
About this extraction
This page contains the full source code of the MatthewYork/DateTools GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 221 files (1011.1 KB), approximately 290.2k tokens, and a symbol index with 9 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.