Commit abe6a30d by 王卫

添加部分开发组件

1 parent 874a6e94
Showing with 4796 additions and 1 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -22,4 +22,20 @@ pod 'YYWebImage'
pod 'AFNetworking', '~> 3.0.4'
pod 'JSONModel', '~> 1.2.0'
pod 'DateTools'
pod 'ReactiveCocoa', '~> 2.5'
pod 'MagicalRecord','~> 2.3.0'
pod 'MBProgressHUD'
pod 'MJRefresh'
pod 'MWPhotoBrowser', '~> 2.1.2'
pod 'MSWeakTimer'
pod 'SDCycleScrollView'
pod 'SocketRocket'
pod 'RealReachability'
pod 'YYModel'
pod 'YYText'
pod 'Toast'
end
......@@ -14,33 +14,91 @@ PODS:
- AFNetworking/Serialization (3.0.4)
- AFNetworking/UIKit (3.0.4):
- AFNetworking/NSURLSession
- DACircularProgress (2.3.1)
- DateTools (2.0.0)
- JSONModel (1.2.0)
- MagicalRecord (2.3.2):
- MagicalRecord/Core (= 2.3.2)
- MagicalRecord/Core (2.3.2)
- Masonry (1.1.0)
- MBProgressHUD (0.9.2)
- MJRefresh (3.1.15.1)
- MSWeakTimer (1.1.0)
- MWPhotoBrowser (2.1.2):
- DACircularProgress (~> 2.3)
- MBProgressHUD (~> 0.9)
- SDWebImage (!= 3.7.2, ~> 3.7)
- ReactiveCocoa (2.5):
- ReactiveCocoa/UI (= 2.5)
- ReactiveCocoa/Core (2.5):
- ReactiveCocoa/no-arc
- ReactiveCocoa/no-arc (2.5)
- ReactiveCocoa/UI (2.5):
- ReactiveCocoa/Core
- RealReachability (1.1.9):
- RealReachability/Connection (= 1.1.9)
- RealReachability/Ping (= 1.1.9)
- RealReachability/Connection (1.1.9)
- RealReachability/Ping (1.1.9)
- SDCycleScrollView (1.65):
- SDWebImage (~> 3.7)
- SDWebImage (3.8.2):
- SDWebImage/Core (= 3.8.2)
- SDWebImage/Core (3.8.2)
- SocketRocket (0.5.1)
- Toast (4.0.0)
- YYCache (1.0.4)
- YYImage (1.0.4):
- YYImage/Core (= 1.0.4)
- YYImage/Core (1.0.4)
- YYModel (1.0.4)
- YYText (1.0.7)
- YYWebImage (1.0.5):
- YYCache
- YYImage
DEPENDENCIES:
- AFNetworking (~> 3.0.4)
- DateTools
- JSONModel (~> 1.2.0)
- MagicalRecord (~> 2.3.0)
- Masonry
- MBProgressHUD
- MJRefresh
- MSWeakTimer
- MWPhotoBrowser (~> 2.1.2)
- ReactiveCocoa (~> 2.5)
- RealReachability
- SDCycleScrollView
- SocketRocket
- Toast
- YYModel
- YYText
- YYWebImage
SPEC CHECKSUMS:
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71
DateTools: 933ac9c490f21f92127cf690ccd8c397e0126caf
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJRefresh: 5f8552bc25ca8751c010f621c1098dbdaacbccd6
MSWeakTimer: 9426150f933b80ed3acf3f6d228e4b61f0e303c8
MWPhotoBrowser: 5836d7aa041dc05a13de380c246826578adc5ea5
ReactiveCocoa: e2db045570aa97c695e7aa97c2bcab222ae51f4a
RealReachability: a8c483900986a0f3305733961effbfbb00637a02
SDCycleScrollView: f72904c77698a7f93a41bcbbc2d78b073bf7326c
SDWebImage: 098e97e6176540799c27e804c96653ee0833d13c
SocketRocket: d57c7159b83c3c6655745cd15302aa24b6bae531
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
YYCache: 8105b6638f5e849296c71f331ff83891a4942952
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
PODFILE CHECKSUM: ab72c1bee6a6b3c39bea8b95dcbef6a9567e68a7
PODFILE CHECKSUM: b8d90621012fc53dee62020ac2c7eb131f8a641e
COCOAPODS: 1.3.1
//
// DACircularProgressView.h
// DACircularProgress
//
// Created by Daniel Amitay on 2/6/12.
// Copyright (c) 2012 Daniel Amitay. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DACircularProgressView : UIView
@property(nonatomic, strong) UIColor *trackTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *progressTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic, strong) UIColor *innerTintColor UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger roundedCorners UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
@property(nonatomic) CGFloat thicknessRatio UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger clockwiseProgress UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
@property(nonatomic) CGFloat progress;
@property(nonatomic) CGFloat indeterminateDuration UI_APPEARANCE_SELECTOR;
@property(nonatomic) NSInteger indeterminate UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-(
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay withDuration:(CFTimeInterval)duration;
@end
//
// DACircularProgressView.m
// DACircularProgress
//
// Created by Daniel Amitay on 2/6/12.
// Copyright (c) 2012 Daniel Amitay. All rights reserved.
//
#import "DACircularProgressView.h"
#import <QuartzCore/QuartzCore.h>
@interface DACircularProgressLayer : CALayer
@property(nonatomic, strong) UIColor *trackTintColor;
@property(nonatomic, strong) UIColor *progressTintColor;
@property(nonatomic, strong) UIColor *innerTintColor;
@property(nonatomic) NSInteger roundedCorners;
@property(nonatomic) CGFloat thicknessRatio;
@property(nonatomic) CGFloat progress;
@property(nonatomic) NSInteger clockwiseProgress;
@end
@implementation DACircularProgressLayer
@dynamic trackTintColor;
@dynamic progressTintColor;
@dynamic innerTintColor;
@dynamic roundedCorners;
@dynamic thicknessRatio;
@dynamic progress;
@dynamic clockwiseProgress;
+ (BOOL)needsDisplayForKey:(NSString *)key
{
if ([key isEqualToString:@"progress"]) {
return YES;
} else {
return [super needsDisplayForKey:key];
}
}
- (void)drawInContext:(CGContextRef)context
{
CGRect rect = self.bounds;
CGPoint centerPoint = CGPointMake(rect.size.width / 2.0f, rect.size.height / 2.0f);
CGFloat radius = MIN(rect.size.height, rect.size.width) / 2.0f;
BOOL clockwise = (self.clockwiseProgress != 0);
CGFloat progress = MIN(self.progress, 1.0f - FLT_EPSILON);
CGFloat radians = 0;
if (clockwise) {
radians = (float)((progress * 2.0f * M_PI) - M_PI_2);
} else {
radians = (float)(3 * M_PI_2 - (progress * 2.0f * M_PI));
}
CGContextSetFillColorWithColor(context, self.trackTintColor.CGColor);
CGMutablePathRef trackPath = CGPathCreateMutable();
CGPathMoveToPoint(trackPath, NULL, centerPoint.x, centerPoint.y);
CGPathAddArc(trackPath, NULL, centerPoint.x, centerPoint.y, radius, (float)(2.0f * M_PI), 0.0f, TRUE);
CGPathCloseSubpath(trackPath);
CGContextAddPath(context, trackPath);
CGContextFillPath(context);
CGPathRelease(trackPath);
if (progress > 0.0f) {
CGContextSetFillColorWithColor(context, self.progressTintColor.CGColor);
CGMutablePathRef progressPath = CGPathCreateMutable();
CGPathMoveToPoint(progressPath, NULL, centerPoint.x, centerPoint.y);
CGPathAddArc(progressPath, NULL, centerPoint.x, centerPoint.y, radius, (float)(3.0f * M_PI_2), radians, !clockwise);
CGPathCloseSubpath(progressPath);
CGContextAddPath(context, progressPath);
CGContextFillPath(context);
CGPathRelease(progressPath);
}
if (progress > 0.0f && self.roundedCorners) {
CGFloat pathWidth = radius * self.thicknessRatio;
CGFloat xOffset = radius * (1.0f + ((1.0f - (self.thicknessRatio / 2.0f)) * cosf(radians)));
CGFloat yOffset = radius * (1.0f + ((1.0f - (self.thicknessRatio / 2.0f)) * sinf(radians)));
CGPoint endPoint = CGPointMake(xOffset, yOffset);
CGRect startEllipseRect = (CGRect) {
.origin.x = centerPoint.x - pathWidth / 2.0f,
.origin.y = 0.0f,
.size.width = pathWidth,
.size.height = pathWidth
};
CGContextAddEllipseInRect(context, startEllipseRect);
CGContextFillPath(context);
CGRect endEllipseRect = (CGRect) {
.origin.x = endPoint.x - pathWidth / 2.0f,
.origin.y = endPoint.y - pathWidth / 2.0f,
.size.width = pathWidth,
.size.height = pathWidth
};
CGContextAddEllipseInRect(context, endEllipseRect);
CGContextFillPath(context);
}
CGContextSetBlendMode(context, kCGBlendModeClear);
CGFloat innerRadius = radius * (1.0f - self.thicknessRatio);
CGRect clearRect = (CGRect) {
.origin.x = centerPoint.x - innerRadius,
.origin.y = centerPoint.y - innerRadius,
.size.width = innerRadius * 2.0f,
.size.height = innerRadius * 2.0f
};
CGContextAddEllipseInRect(context, clearRect);
CGContextFillPath(context);
if (self.innerTintColor) {
CGContextSetBlendMode(context, kCGBlendModeNormal);
CGContextSetFillColorWithColor(context, [self.innerTintColor CGColor]);
CGContextAddEllipseInRect(context, clearRect);
CGContextFillPath(context);
}
}
@end
@interface DACircularProgressView ()
@end
@implementation DACircularProgressView
+ (void) initialize
{
if (self == [DACircularProgressView class]) {
DACircularProgressView *circularProgressViewAppearance = [DACircularProgressView appearance];
[circularProgressViewAppearance setTrackTintColor:[[UIColor whiteColor] colorWithAlphaComponent:0.3f]];
[circularProgressViewAppearance setProgressTintColor:[UIColor whiteColor]];
[circularProgressViewAppearance setInnerTintColor:nil];
[circularProgressViewAppearance setBackgroundColor:[UIColor clearColor]];
[circularProgressViewAppearance setThicknessRatio:0.3f];
[circularProgressViewAppearance setRoundedCorners:NO];
[circularProgressViewAppearance setClockwiseProgress:YES];
[circularProgressViewAppearance setIndeterminateDuration:2.0f];
[circularProgressViewAppearance setIndeterminate:NO];
}
}
+ (Class)layerClass
{
return [DACircularProgressLayer class];
}
- (DACircularProgressLayer *)circularProgressLayer
{
return (DACircularProgressLayer *)self.layer;
}
- (id)init
{
return [super initWithFrame:CGRectMake(0.0f, 0.0f, 40.0f, 40.0f)];
}
- (void)didMoveToWindow
{
CGFloat windowContentsScale = self.window.screen.scale;
self.circularProgressLayer.contentsScale = windowContentsScale;
[self.circularProgressLayer setNeedsDisplay];
}
#pragma mark - Progress
- (CGFloat)progress
{
return self.circularProgressLayer.progress;
}
- (void)setProgress:(CGFloat)progress
{
[self setProgress:progress animated:NO];
}
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated
{
[self setProgress:progress animated:animated initialDelay:0.0];
}
- (void)setProgress:(CGFloat)progress
animated:(BOOL)animated
initialDelay:(CFTimeInterval)initialDelay
{
CGFloat pinnedProgress = MIN(MAX(progress, 0.0f), 1.0f);
[self setProgress:progress
animated:animated
initialDelay:initialDelay
withDuration:fabs(self.progress - pinnedProgress)];
}
- (void)setProgress:(CGFloat)progress
animated:(BOOL)animated
initialDelay:(CFTimeInterval)initialDelay
withDuration:(CFTimeInterval)duration
{
[self.layer removeAnimationForKey:@"indeterminateAnimation"];
[self.circularProgressLayer removeAnimationForKey:@"progress"];
CGFloat pinnedProgress = MIN(MAX(progress, 0.0f), 1.0f);
if (animated) {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"progress"];
animation.duration = duration;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
animation.fillMode = kCAFillModeForwards;
animation.fromValue = [NSNumber numberWithFloat:self.progress];
animation.toValue = [NSNumber numberWithFloat:pinnedProgress];
animation.beginTime = CACurrentMediaTime() + initialDelay;
animation.delegate = self;
[self.circularProgressLayer addAnimation:animation forKey:@"progress"];
} else {
[self.circularProgressLayer setNeedsDisplay];
self.circularProgressLayer.progress = pinnedProgress;
}
}
- (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)flag
{
NSNumber *pinnedProgressNumber = [animation valueForKey:@"toValue"];
self.circularProgressLayer.progress = [pinnedProgressNumber floatValue];
}
#pragma mark - UIAppearance methods
- (UIColor *)trackTintColor
{
return self.circularProgressLayer.trackTintColor;
}
- (void)setTrackTintColor:(UIColor *)trackTintColor
{
self.circularProgressLayer.trackTintColor = trackTintColor;
[self.circularProgressLayer setNeedsDisplay];
}
- (UIColor *)progressTintColor
{
return self.circularProgressLayer.progressTintColor;
}
- (void)setProgressTintColor:(UIColor *)progressTintColor
{
self.circularProgressLayer.progressTintColor = progressTintColor;
[self.circularProgressLayer setNeedsDisplay];
}
- (UIColor *)innerTintColor
{
return self.circularProgressLayer.innerTintColor;
}
- (void)setInnerTintColor:(UIColor *)innerTintColor
{
self.circularProgressLayer.innerTintColor = innerTintColor;
[self.circularProgressLayer setNeedsDisplay];
}
- (NSInteger)roundedCorners
{
return self.roundedCorners;
}
- (void)setRoundedCorners:(NSInteger)roundedCorners
{
self.circularProgressLayer.roundedCorners = roundedCorners;
[self.circularProgressLayer setNeedsDisplay];
}
- (CGFloat)thicknessRatio
{
return self.circularProgressLayer.thicknessRatio;
}
- (void)setThicknessRatio:(CGFloat)thicknessRatio
{
self.circularProgressLayer.thicknessRatio = MIN(MAX(thicknessRatio, 0.f), 1.f);
[self.circularProgressLayer setNeedsDisplay];
}
- (NSInteger)indeterminate
{
CAAnimation *spinAnimation = [self.layer animationForKey:@"indeterminateAnimation"];
return (spinAnimation == nil ? 0 : 1);
}
- (void)setIndeterminate:(NSInteger)indeterminate
{
if (indeterminate) {
if (!self.indeterminate) {
CABasicAnimation *spinAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
spinAnimation.byValue = [NSNumber numberWithDouble:indeterminate > 0 ? 2.0f*M_PI : -2.0f*M_PI];
spinAnimation.duration = self.indeterminateDuration;
spinAnimation.repeatCount = HUGE_VALF;
[self.layer addAnimation:spinAnimation forKey:@"indeterminateAnimation"];
}
} else {
[self.layer removeAnimationForKey:@"indeterminateAnimation"];
}
}
- (NSInteger)clockwiseProgress
{
return self.circularProgressLayer.clockwiseProgress;
}
- (void)setClockwiseProgress:(NSInteger)clockwiseProgres
{
self.circularProgressLayer.clockwiseProgress = clockwiseProgres;
[self.circularProgressLayer setNeedsDisplay];
}
@end
//
// DALabeledCircularProgressView.h
// DACircularProgressExample
//
// Created by Josh Sklar on 4/8/14.
// Copyright (c) 2014 Shout Messenger. All rights reserved.
//
#import "DACircularProgressView.h"
/**
@class DALabeledCircularProgressView
@brief Subclass of DACircularProgressView that adds a UILabel.
*/
@interface DALabeledCircularProgressView : DACircularProgressView
/**
UILabel placed right on the DACircularProgressView.
*/
@property (strong, nonatomic) UILabel *progressLabel;
@end
//
// DALabeledCircularProgressView.m
// DACircularProgressExample
//
// Created by Josh Sklar on 4/8/14.
// Copyright (c) 2014 Shout Messenger. All rights reserved.
//
#import "DALabeledCircularProgressView.h"
@implementation DALabeledCircularProgressView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initializeLabel];
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
[self initializeLabel];
}
return self;
}
#pragma mark - Internal methods
/**
Creates and initializes
-[DALabeledCircularProgressView progressLabel].
*/
- (void)initializeLabel
{
self.progressLabel = [[UILabel alloc] initWithFrame:self.bounds];
self.progressLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
self.progressLabel.textAlignment = NSTextAlignmentCenter;
self.progressLabel.backgroundColor = [UIColor clearColor];
[self addSubview:self.progressLabel];
}
@end
# License
## MIT License
Copyright (c) 2013 Daniel Amitay (http://danielamitay.com)
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.
\ No newline at end of file
## DACircularProgress
`DACircularProgress` is a `UIView` subclass with circular `UIProgressView` properties.
It was originally built to be an imitation of Facebook's photo progress indicator.
View the included example project for a demonstration.
![Screenshot](https://github.com/danielamitay/DACircularProgress/raw/master/screenshot.png)
## Installation
To use `DACircularProgress`:
- Copy over the `DACircularProgress` folder to your project folder.
- Make sure that your project includes `<QuartzCore.framework>`.
- `#import "DACircularProgressView.h"`
### Example Code
```objective-c
self.progressView = [[DACircularProgressView alloc] initWithFrame:CGRectMake(140.0f, 30.0f, 40.0f, 40.0f)];
self.progressView.roundedCorners = YES;
self.progressView.trackTintColor = [UIColor clearColor];
[self.view addSubview:self.progressView];
```
- You can also use Interface Builder by adding a `UIView` element and setting its class to `DACircularProgress`
## Notes
### Compatibility
iOS5.0+
### Automatic Reference Counting (ARC) support
`DACircularProgress` was made with ARC enabled by default.
## Contact
- [Personal website](http://danielamitay.com)
- [GitHub](http://github.com/danielamitay)
- [Twitter](http://twitter.com/danielamitay)
- [LinkedIn](http://www.linkedin.com/in/danielamitay)
- [Email](hello@danielamitay.com)
If you use/enjoy `DACircularProgress`, let me know!
## Credits
`DACircularProgress` is brought to you by [Daniel Amitay](http://www.amitay.us) and [contributors to the project](https://github.com/danielamitay/DACircularProgress/contributors). A special thanks to [Cédric Luthi](https://github.com/0xced) for a significant amount of changes. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/danielamitay/DACircularProgress/issues/new).
## License
### MIT License
Copyright (c) 2013 Daniel Amitay (http://danielamitay.com)
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.
// 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"
\ No newline at end of file
// 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;
\ No newline at end of file
// 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
// 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
// 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
// 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
// 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
// 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
// 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
// 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
/* 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
/* 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" = "тази година";
/* 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";
/* 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
/* 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";
/* 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";
\ No newline at end of file
/* 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
/* 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";
"周一" = "星期一";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
\ No newline at end of file
/* 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. */
"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
/* 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";
/* 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";
/* 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";
/* 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
/* 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" = "השנה";
/* 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
/* 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";
/* 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";
/* 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";
/* 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";
/* 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";
/* 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
/* 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" = "올해";
"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";
/* 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
/*
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";
/* 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";
/* 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";
/* 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";
/* 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";
/* 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)
/*
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" = "В этом году";
/* 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";
/* 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
/* 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
/*
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" = "Цього року";
/* 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";
/* 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" = "星期日";
"周一" = "星期一";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
\ No newline at end of file
/* 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" = "星期日";
"周壹" = "星期壹";
"周二" = "星期二";
"周三" = "星期三";
"周四" = "星期四";
"周五" = "星期五";
"周六" = "星期六";
"周日" = "星期日";
\ No newline at end of file
// 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"
\ No newline at end of file
// 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
#define DateToolsLocalizedStrings(key) \
NSLocalizedStringFromTableInBundle(key, @"DateTools", [NSBundle bundleWithPath:[[[NSBundle bundleForClass:[DTError class]] resourcePath] stringByAppendingPathComponent:@"DateTools.bundle"]], nil)
#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
The MIT License (MIT)
Copyright (c) 2014 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.
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!