Initial Commit
This commit is contained in:
commit
cdbd497fc8
|
@ -0,0 +1,4 @@
|
|||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
/*.xcodeproj
|
|
@ -0,0 +1,31 @@
|
|||
// swift-tools-version:3.1
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "DateToolsObjC",
|
||||
exclude: [
|
||||
"Sources/DTConstants.h",
|
||||
"Sources/DTConstants.m",
|
||||
|
||||
"Sources/DTError.h",
|
||||
"Sources/DTError.m",
|
||||
|
||||
"Sources/NSDate+DateTools.h",
|
||||
"Sources/NSDate+DateTools.m",
|
||||
|
||||
"Sources/DTTimePeriod.h",
|
||||
"Sources/DTTimePeriod.m",
|
||||
|
||||
"Sources/DTTimePeriodGroup.h",
|
||||
"Sources/DTTimePeriodGroup.m",
|
||||
|
||||
"Sources/DTTimePeriodCollection.h",
|
||||
"Sources/DTTimePeriodCollection.m",
|
||||
|
||||
"Sources/DTTimePeriodChain.h",
|
||||
"Sources/DTTimePeriodChain.m",
|
||||
|
||||
"Sources/DateTools.bundle"
|
||||
]
|
||||
)
|
|
@ -0,0 +1,35 @@
|
|||
// 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"
|
|
@ -0,0 +1,33 @@
|
|||
// 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;
|
|
@ -0,0 +1,38 @@
|
|||
// 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
|
|
@ -0,0 +1,72 @@
|
|||
// 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
|
|
@ -0,0 +1,123 @@
|
|||
// 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
|
|
@ -0,0 +1,642 @@
|
|||
// Copyright (C) 2014 by Matthew York
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any
|
||||
// person obtaining a copy of this software and
|
||||
// associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the
|
||||
// Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall
|
||||
// be included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "DTTimePeriod.h"
|
||||
#import "NSDate+DateTools.h"
|
||||
|
||||
@interface DTTimePeriod ()
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation DTTimePeriod
|
||||
|
||||
#pragma mark - Custom Init / Factory Methods
|
||||
/**
|
||||
* Initializes an instance of DTTimePeriod from a given start and end date
|
||||
*
|
||||
* @param startDate NSDate - Desired start date
|
||||
* @param endDate NSDate - Desired end date
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
-(instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate{
|
||||
if (self = [super init]) {
|
||||
self.StartDate = startDate;
|
||||
self.EndDate = endDate;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod from a given start and end date
|
||||
*
|
||||
* @param startDate NSDate - Desired start date
|
||||
* @param endDate NSDate - Desired end date
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate{
|
||||
return [[self.class alloc] initWithStartDate:startDate endDate:endDate];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod that starts on the provided start date
|
||||
* and is of the size provided
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param date NSDate - Desired start date of the new time period
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size startingAt:(NSDate *)date{
|
||||
return [[self.class alloc] initWithStartDate:date endDate:[DTTimePeriod dateWithAddedTime:size amount:1 baseDate:date]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod that starts on the provided start date
|
||||
* and is of the size provided. The amount represents a multipler to the size (e.g. "2 weeks" or "4 years")
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param amount NSInteger - Desired multiplier of the size provided
|
||||
* @param date NSDate - Desired start date of the new time period
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount startingAt:(NSDate *)date{
|
||||
return [[self.class alloc] initWithStartDate:date endDate:[DTTimePeriod dateWithAddedTime:size amount:amount baseDate:date]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod that ends on the provided end date
|
||||
* and is of the size provided
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param date NSDate - Desired end date of the new time period
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size endingAt:(NSDate *)date{
|
||||
return [[self.class alloc] initWithStartDate:[DTTimePeriod dateWithSubtractedTime:size amount:1 baseDate:date] endDate:date];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod that ends on the provided end date
|
||||
* and is of the size provided. The amount represents a multipler to the size (e.g. "2 weeks" or "4 years")
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param amount NSInteger - Desired multiplier of the size provided
|
||||
* @param date NSDate - Desired end date of the new time period
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount endingAt:(NSDate *)date{
|
||||
return [[self.class alloc] initWithStartDate:[DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:date] endDate:date];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriod that represents the largest time period available.
|
||||
* The start date is in the distant past and the end date is in the distant future.
|
||||
*
|
||||
* @return DTTimePeriod - new instance
|
||||
*/
|
||||
+(instancetype)timePeriodWithAllTime{
|
||||
return [[self.class alloc] initWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Method serving the various factory methods as well as a few others.
|
||||
* Returns a date with time added to a given base date. Includes multiplier amount.
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param amount NSInteger - Desired multiplier of the size provided
|
||||
* @param date NSDate - Desired end date of the new time period
|
||||
*
|
||||
* @return NSDate - new instance
|
||||
*/
|
||||
+(NSDate *)dateWithAddedTime:(DTTimePeriodSize)size amount:(NSInteger)amount baseDate:(NSDate *)date{
|
||||
switch (size) {
|
||||
case DTTimePeriodSizeSecond:
|
||||
return [date dateByAddingSeconds:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeMinute:
|
||||
return [date dateByAddingMinutes:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeHour:
|
||||
return [date dateByAddingHours:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeDay:
|
||||
return [date dateByAddingDays:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeWeek:
|
||||
return [date dateByAddingWeeks:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeMonth:
|
||||
return [date dateByAddingMonths:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeYear:
|
||||
return [date dateByAddingYears:amount];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method serving the various factory methods as well as a few others.
|
||||
* Returns a date with time subtracted from a given base date. Includes multiplier amount.
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired size of the new time period
|
||||
* @param amount NSInteger - Desired multiplier of the size provided
|
||||
* @param date NSDate - Desired end date of the new time period
|
||||
*
|
||||
* @return NSDate - new instance
|
||||
*/
|
||||
+(NSDate *)dateWithSubtractedTime:(DTTimePeriodSize)size amount:(NSInteger)amount baseDate:(NSDate *)date{
|
||||
switch (size) {
|
||||
case DTTimePeriodSizeSecond:
|
||||
return [date dateBySubtractingSeconds:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeMinute:
|
||||
return [date dateBySubtractingMinutes:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeHour:
|
||||
return [date dateBySubtractingHours:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeDay:
|
||||
return [date dateBySubtractingDays:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeWeek:
|
||||
return [date dateBySubtractingWeeks:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeMonth:
|
||||
return [date dateBySubtractingMonths:amount];
|
||||
break;
|
||||
case DTTimePeriodSizeYear:
|
||||
return [date dateBySubtractingYears:amount];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
#pragma mark - Time Period Information
|
||||
/**
|
||||
* Returns a boolean representing whether the receiver's StartDate exists
|
||||
* Returns YES if StartDate is not nil, otherwise NO
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)hasStartDate {
|
||||
return (self.StartDate)? YES:NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a boolean representing whether the receiver's EndDate exists
|
||||
* Returns YES if EndDate is not nil, otherwise NO
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)hasEndDate {
|
||||
return (self.EndDate)? YES:NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a boolean representing whether the receiver is a "moment", that is the start and end dates are the same.
|
||||
* Returns YES if receiver is a moment, otherwise NO
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)isMoment{
|
||||
if (self.StartDate && self.EndDate) {
|
||||
if ([self.StartDate isEqualToDate:self.EndDate]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in years
|
||||
*
|
||||
* @return NSInteger
|
||||
*/
|
||||
-(double)durationInYears {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate yearsEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in weeks
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
-(double)durationInWeeks {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate weeksEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in days
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
-(double)durationInDays {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate daysEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in hours
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
-(double)durationInHours {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate hoursEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in minutes
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
-(double)durationInMinutes {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate minutesEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the duration of the receiver in seconds
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
-(double)durationInSeconds {
|
||||
if (self.StartDate && self.EndDate) {
|
||||
return [self.StartDate secondsEarlierThan:self.EndDate];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark - Time Period Relationship
|
||||
/**
|
||||
* Returns a BOOL representing whether the receiver's start and end dates exatcly match a given time period
|
||||
* Returns YES if the two periods are the same, otherwise NO
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)isEqualToPeriod:(DTTimePeriod *)period{
|
||||
if ([self.StartDate isEqualToDate:period.StartDate] && [self.EndDate isEqualToDate:period.EndDate]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BOOL representing whether the receiver's start and end dates exatcly match a given time period or is contained within them
|
||||
* Returns YES if the receiver is inside the given time period, otherwise NO
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)isInside:(DTTimePeriod *)period{
|
||||
if ([period.StartDate isEarlierThanOrEqualTo:self.StartDate] && [period.EndDate isLaterThanOrEqualTo:self.EndDate]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BOOL representing whether the given time period's start and end dates exatcly match the receivers' or is contained within them
|
||||
* Returns YES if the receiver is inside the given time period, otherwise NO
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)contains:(DTTimePeriod *)period{
|
||||
if ([self.StartDate isEarlierThanOrEqualTo:period.StartDate] && [self.EndDate isLaterThanOrEqualTo:period.EndDate]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BOOL representing whether the receiver and the given time period overlap.
|
||||
* This covers all space they share, minus instantaneous space (i.e. one's start date equals another's end date)
|
||||
* Returns YES if they overlap, otherwise NO
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)overlapsWith:(DTTimePeriod *)period{
|
||||
//Outside -> Inside
|
||||
if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThan:self.StartDate]) {
|
||||
return YES;
|
||||
}
|
||||
//Enclosing
|
||||
else if ([period.StartDate isLaterThanOrEqualTo:self.StartDate] && [period.EndDate isEarlierThanOrEqualTo:self.EndDate]){
|
||||
return YES;
|
||||
}
|
||||
//Inside -> Out
|
||||
else if([period.StartDate isEarlierThan:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BOOL representing whether the receiver and the given time period overlap.
|
||||
* This covers all space they share, including instantaneous space (i.e. one's start date equals another's end date)
|
||||
* Returns YES if they overlap, otherwise NO
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)intersects:(DTTimePeriod *)period{
|
||||
//Outside -> Inside
|
||||
if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThanOrEqualTo:self.StartDate]) {
|
||||
return YES;
|
||||
}
|
||||
//Enclosing
|
||||
else if ([period.StartDate isLaterThanOrEqualTo:self.StartDate] && [period.EndDate isEarlierThanOrEqualTo:self.EndDate]){
|
||||
return YES;
|
||||
}
|
||||
//Inside -> Out
|
||||
else if([period.StartDate isEarlierThanOrEqualTo:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relationship of the receiver to a given time period
|
||||
*
|
||||
* @param period DTTimePeriod - Time period to compare to receiver
|
||||
*
|
||||
* @return DTTimePeriodRelation
|
||||
*/
|
||||
-(DTTimePeriodRelation)relationToPeriod:(DTTimePeriod *)period{
|
||||
|
||||
//Make sure that all start and end points exist for comparison
|
||||
if (self.StartDate && self.EndDate && period.StartDate && period.EndDate) {
|
||||
//Make sure time periods are of positive durations
|
||||
if ([self.StartDate isEarlierThan:self.EndDate] && [period.StartDate isEarlierThan:period.EndDate]) {
|
||||
|
||||
//Make comparisons
|
||||
if ([period.EndDate isEarlierThan:self.StartDate]) {
|
||||
return DTTimePeriodRelationAfter;
|
||||
}
|
||||
else if ([period.EndDate isEqualToDate:self.StartDate]){
|
||||
return DTTimePeriodRelationStartTouching;
|
||||
}
|
||||
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
|
||||
return DTTimePeriodRelationStartInside;
|
||||
}
|
||||
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return DTTimePeriodRelationInsideStartTouching;
|
||||
}
|
||||
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
|
||||
return DTTimePeriodRelationEnclosingStartTouching;
|
||||
}
|
||||
else if ([period.StartDate isLaterThan:self.StartDate] && [period.EndDate isEarlierThan:self.EndDate]){
|
||||
return DTTimePeriodRelationEnclosing;
|
||||
}
|
||||
else if ([period.StartDate isLaterThan:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
|
||||
return DTTimePeriodRelationEnclosingEndTouching;
|
||||
}
|
||||
else if ([period.StartDate isEqualToDate:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
|
||||
return DTTimePeriodRelationExactMatch;
|
||||
}
|
||||
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return DTTimePeriodRelationInside;
|
||||
}
|
||||
else if ([period.StartDate isEarlierThan:self.StartDate] && [period.EndDate isEqualToDate:self.EndDate]){
|
||||
return DTTimePeriodRelationInsideEndTouching;
|
||||
}
|
||||
else if ([period.StartDate isEarlierThan:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return DTTimePeriodRelationEndInside;
|
||||
}
|
||||
else if ([period.StartDate isEqualToDate:self.EndDate] && [period.EndDate isLaterThan:self.EndDate]){
|
||||
return DTTimePeriodRelationEndTouching;
|
||||
}
|
||||
else if ([period.StartDate isLaterThan:self.EndDate]){
|
||||
return DTTimePeriodRelationBefore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DTTimePeriodRelationNone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gap in seconds between the receiver and provided time period
|
||||
* Returns 0 if the time periods intersect, otherwise returns the gap between.
|
||||
*
|
||||
* @param period <#period description#>
|
||||
*
|
||||
* @return <#return value description#>
|
||||
*/
|
||||
-(NSTimeInterval)gapBetween:(DTTimePeriod *)period{
|
||||
if ([self.EndDate isEarlierThan:period.StartDate]) {
|
||||
return ABS([self.EndDate timeIntervalSinceDate:period.StartDate]);
|
||||
}
|
||||
else if ([period.EndDate isEarlierThan:self.StartDate]){
|
||||
return ABS([period.EndDate timeIntervalSinceDate:self.StartDate]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark - Date Relationships
|
||||
/**
|
||||
* Returns a BOOL representing whether the provided date is contained in the receiver.
|
||||
*
|
||||
* @param date NSDate - Date to evaluate
|
||||
* @param interval DTTimePeriodInterval representing evaluation type (Closed includes StartDate and EndDate in evaluation, Open does not)
|
||||
*
|
||||
* @return <#return value description#>
|
||||
*/
|
||||
-(BOOL)containsDate:(NSDate *)date interval:(DTTimePeriodInterval)interval{
|
||||
if (interval == DTTimePeriodIntervalOpen) {
|
||||
if ([self.StartDate isEarlierThan:date] && [self.EndDate isLaterThan:date]) {
|
||||
return YES;
|
||||
}
|
||||
else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
else if (interval == DTTimePeriodIntervalClosed){
|
||||
if ([self.StartDate isEarlierThanOrEqualTo:date] && [self.EndDate isLaterThanOrEqualTo:date]) {
|
||||
return YES;
|
||||
}
|
||||
else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - Period Manipulation
|
||||
/**
|
||||
* Shifts the StartDate and EndDate earlier by a given size amount
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired shift size
|
||||
*/
|
||||
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size{
|
||||
[self shiftEarlierWithSize:size amount:1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Shifts the StartDate and EndDate earlier by a given size amount. Amount multiplies size.
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired shift size
|
||||
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
|
||||
*/
|
||||
-(void)shiftEarlierWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
|
||||
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.StartDate];
|
||||
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.EndDate];
|
||||
}
|
||||
|
||||
/**
|
||||
* Shifts the StartDate and EndDate later by a given size amount
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired shift size
|
||||
*/
|
||||
-(void)shiftLaterWithSize:(DTTimePeriodSize)size{
|
||||
[self shiftLaterWithSize:size amount:1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Shifts the StartDate and EndDate later by a given size amount. Amount multiplies size.
|
||||
*
|
||||
* @param size DTTimePeriodSize - Desired shift size
|
||||
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
|
||||
*/
|
||||
-(void)shiftLaterWithSize:(DTTimePeriodSize)size amount:(NSInteger)amount{
|
||||
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.StartDate];
|
||||
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.EndDate];
|
||||
}
|
||||
|
||||
#pragma mark Lengthen / Shorten
|
||||
/**
|
||||
* Lengthens the receiver by a given amount, anchored by a provided point
|
||||
*
|
||||
* @param anchor DTTimePeriodAnchor - Anchor point for the lengthen (the date that stays the same)
|
||||
* @param size DTTimePeriodSize - Desired lenghtening size
|
||||
*/
|
||||
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size{
|
||||
[self lengthenWithAnchorDate:anchor size:size amount:1];
|
||||
}
|
||||
/**
|
||||
* Lengthens the receiver by a given amount, anchored by a provided point. Amount multiplies size.
|
||||
*
|
||||
* @param anchor DTTimePeriodAnchor - Anchor point for the lengthen (the date that stays the same)
|
||||
* @param size DTTimePeriodSize - Desired lenghtening size
|
||||
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
|
||||
*/
|
||||
-(void)lengthenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount{
|
||||
switch (anchor) {
|
||||
case DTTimePeriodAnchorStart:
|
||||
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.EndDate];
|
||||
break;
|
||||
case DTTimePeriodAnchorCenter:
|
||||
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount/2 baseDate:self.StartDate];
|
||||
self.EndDate = [DTTimePeriod dateWithAddedTime:size amount:amount/2 baseDate:self.EndDate];
|
||||
break;
|
||||
case DTTimePeriodAnchorEnd:
|
||||
self.StartDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.StartDate];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortens the receiver by a given amount, anchored by a provided point
|
||||
*
|
||||
* @param anchor DTTimePeriodAnchor - Anchor point for the shorten (the date that stays the same)
|
||||
* @param size DTTimePeriodSize - Desired shortening size
|
||||
*/
|
||||
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size{
|
||||
[self shortenWithAnchorDate:anchor size:size amount:1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortens the receiver by a given amount, anchored by a provided point. Amount multiplies size.
|
||||
*
|
||||
* @param anchor DTTimePeriodAnchor - Anchor point for the shorten (the date that stays the same)
|
||||
* @param size DTTimePeriodSize - Desired shortening size
|
||||
* @param amount NSInteger - Multiplier of size (i.e. "2 weeks" or "4 years")
|
||||
*/
|
||||
-(void)shortenWithAnchorDate:(DTTimePeriodAnchor)anchor size:(DTTimePeriodSize)size amount:(NSInteger)amount{
|
||||
switch (anchor) {
|
||||
case DTTimePeriodAnchorStart:
|
||||
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount baseDate:self.EndDate];
|
||||
break;
|
||||
case DTTimePeriodAnchorCenter:
|
||||
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount/2 baseDate:self.StartDate];
|
||||
self.EndDate = [DTTimePeriod dateWithSubtractedTime:size amount:amount/2 baseDate:self.EndDate];
|
||||
break;
|
||||
case DTTimePeriodAnchorEnd:
|
||||
self.StartDate = [DTTimePeriod dateWithAddedTime:size amount:amount baseDate:self.StartDate];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Helper Methods
|
||||
-(DTTimePeriod *)copy{
|
||||
DTTimePeriod *period = [DTTimePeriod timePeriodWithStartDate:[NSDate dateWithTimeIntervalSince1970:self.StartDate.timeIntervalSince1970] endDate:[NSDate dateWithTimeIntervalSince1970:self.EndDate.timeIntervalSince1970]];
|
||||
return period;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,49 @@
|
|||
// 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
|
|
@ -0,0 +1,218 @@
|
|||
// 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
|
|
@ -0,0 +1,56 @@
|
|||
// 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
|
|
@ -0,0 +1,370 @@
|
|||
// Copyright (C) 2014 by Matthew York
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any
|
||||
// person obtaining a copy of this software and
|
||||
// associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the
|
||||
// Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall
|
||||
// be included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#import "DTTimePeriodCollection.h"
|
||||
#import "DTError.h"
|
||||
#import "NSDate+DateTools.h"
|
||||
|
||||
@implementation DTTimePeriodCollection
|
||||
|
||||
#pragma mark - Custom Init / Factory Methods
|
||||
/**
|
||||
* Initializes a new instance of DTTimePeriodCollection
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
+(DTTimePeriodCollection *)collection{
|
||||
return [[DTTimePeriodCollection alloc] init];
|
||||
}
|
||||
|
||||
#pragma mark - Collection Manipulation
|
||||
/**
|
||||
* Adds a time period to the reciever.
|
||||
*
|
||||
* @param period DTTimePeriod - The time period to add to the collection
|
||||
*/
|
||||
-(void)addTimePeriod:(DTTimePeriod *)period{
|
||||
if ([period isKindOfClass:[DTTimePeriod class]]) {
|
||||
[periods addObject:period];
|
||||
|
||||
//Set object's variables with updated array values
|
||||
[self updateVariables];
|
||||
}
|
||||
else {
|
||||
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a time period to the receiver at a given index.
|
||||
*
|
||||
* @param period DTTimePeriod - The time period to insert into the collection
|
||||
* @param index NSInteger - The index in the collection the time period is to be added at
|
||||
*/
|
||||
-(void)insertTimePeriod:(DTTimePeriod *)period atIndex:(NSInteger)index{
|
||||
if ([period class] != [DTTimePeriod class]) {
|
||||
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
|
||||
return;
|
||||
}
|
||||
|
||||
if (index >= 0 && index < periods.count) {
|
||||
[periods insertObject:period atIndex:index];
|
||||
|
||||
//Set object's variables with updated array values
|
||||
[self updateVariables];
|
||||
}
|
||||
else {
|
||||
[DTError throwInsertOutOfBoundsException:index array:periods];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the time period at a given index from the collection
|
||||
*
|
||||
* @param index NSInteger - The index in the collection the time period is to be removed from
|
||||
*/
|
||||
-(void)removeTimePeriodAtIndex:(NSInteger)index{
|
||||
if (index >= 0 && index < periods.count) {
|
||||
[periods removeObjectAtIndex:index];
|
||||
|
||||
//Update the object variables
|
||||
if (periods.count > 0) {
|
||||
//Set object's variables with updated array values
|
||||
[self updateVariables];
|
||||
}
|
||||
else {
|
||||
[self setVariablesNil];
|
||||
}
|
||||
}
|
||||
else {
|
||||
[DTError throwRemoveOutOfBoundsException:index array:periods];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - Sorting
|
||||
/**
|
||||
* Sorts the time periods in the collection by earliest start date to latest start date.
|
||||
*/
|
||||
-(void)sortByStartAscending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
return [((DTTimePeriod *) obj1).StartDate compare:((DTTimePeriod *) obj2).StartDate];
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the time periods in the collection by latest start date to earliest start date.
|
||||
*/
|
||||
-(void)sortByStartDescending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
return [((DTTimePeriod *) obj2).StartDate compare:((DTTimePeriod *) obj1).StartDate];
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the time periods in the collection by earliest end date to latest end date.
|
||||
*/
|
||||
-(void)sortByEndAscending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
return [((DTTimePeriod *) obj1).EndDate compare:((DTTimePeriod *) obj2).EndDate];
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the time periods in the collection by latest end date to earliest end date.
|
||||
*/
|
||||
-(void)sortByEndDescending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
return [((DTTimePeriod *) obj2).EndDate compare:((DTTimePeriod *) obj1).EndDate];
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the time periods in the collection by how much time they span. Sorts smallest durations to longest.
|
||||
*/
|
||||
-(void)sortByDurationAscending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
if (((DTTimePeriod *) obj1).durationInSeconds < ((DTTimePeriod *) obj2).durationInSeconds) {
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
else {
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
return NSOrderedSame;
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the time periods in the collection by how much time they span. Sorts longest durations to smallest.
|
||||
*/
|
||||
-(void)sortByDurationDescending{
|
||||
[periods sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
|
||||
if (((DTTimePeriod *) obj1).durationInSeconds > ((DTTimePeriod *) obj2).durationInSeconds) {
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
else {
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
return NSOrderedSame;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Collection Relationship
|
||||
/**
|
||||
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that fall inside a given time period.
|
||||
* Time periods of the receiver must have a start date and end date within the closed interval of the period provided to be included.
|
||||
*
|
||||
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
-(DTTimePeriodCollection *)periodsInside:(DTTimePeriod *)period{
|
||||
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
|
||||
|
||||
if ([period isKindOfClass:[DTTimePeriod class]]) {
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if ([((DTTimePeriod *) obj) isInside:period]) {
|
||||
[collection addTimePeriod:obj];
|
||||
}
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that intersect a given date.
|
||||
* Time periods of the receiver must have a start date earlier than or equal to the comparison date and an end date later than or equal to the comparison date to be included
|
||||
*
|
||||
* @param date NSDate - The date to check against the receiver's time periods
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
-(DTTimePeriodCollection *)periodsIntersectedByDate:(NSDate *)date{
|
||||
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
|
||||
|
||||
if ([date isKindOfClass:[NSDate class]]) {
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if ([((DTTimePeriod *) obj) containsDate:date interval:DTTimePeriodIntervalClosed]) {
|
||||
[collection addTimePeriod:obj];
|
||||
}
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[DTError throwBadTypeException:date expectedClass:[NSDate class]];
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that intersect a given time period.
|
||||
* Intersection with the given time period includes other time periods that simply touch it. (i.e. one's start date is equal to another's end date)
|
||||
*
|
||||
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
-(DTTimePeriodCollection *)periodsIntersectedByPeriod:(DTTimePeriod *)period{
|
||||
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
|
||||
|
||||
if ([period isKindOfClass:[DTTimePeriod class]]) {
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if ([((DTTimePeriod *) obj) intersects:period]) {
|
||||
[collection addTimePeriod:obj];
|
||||
}
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[DTError throwBadTypeException:period expectedClass:[DTTimePeriod class]];
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of DTTimePeriodCollection with all the time periods in the receiver that overlap a given time period.
|
||||
* Overlap with the given time period does NOT include other time periods that simply touch it. (i.e. one's start date is equal to another's end date)
|
||||
*
|
||||
* @param period DTTimePeriod - The time period to check against the receiver's time periods.
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
-(DTTimePeriodCollection *)periodsOverlappedByPeriod:(DTTimePeriod *)period{
|
||||
DTTimePeriodCollection *collection = [[DTTimePeriodCollection alloc] init];
|
||||
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if ([((DTTimePeriod *) obj) overlapsWith:period]) {
|
||||
[collection addTimePeriod:obj];
|
||||
}
|
||||
}];
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a BOOL representing whether the receiver is equal to a given DTTimePeriodCollection. Equality requires the start and end dates to be the same, and all time periods to be the same.
|
||||
*
|
||||
* If you would like to take the order of the time periods in two collections into consideration, you may do so with the considerOrder BOOL
|
||||
*
|
||||
* @param collection DTTimePeriodCollection - The collection to compare with the receiver
|
||||
* @param considerOrder BOOL - Option for whether to account for the time periods order in the test for equality. YES considers order, NO does not.
|
||||
*
|
||||
* @return BOOL
|
||||
*/
|
||||
-(BOOL)isEqualToCollection:(DTTimePeriodCollection *)collection considerOrder:(BOOL)considerOrder{
|
||||
//Check class
|
||||
if ([collection class] != [DTTimePeriodCollection class]) {
|
||||
[DTError throwBadTypeException:collection expectedClass:[DTTimePeriodCollection class]];
|
||||
return NO;
|
||||
}
|
||||
|
||||
//Check group level characteristics for speed
|
||||
if (![self hasSameCharacteristicsAs:collection]) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
//Default to equality and look for inequality
|
||||
__block BOOL isEqual = YES;
|
||||
if (considerOrder) {
|
||||
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if (![collection[idx] isEqualToPeriod:obj]) {
|
||||
isEqual = NO;
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
}
|
||||
else {
|
||||
__block DTTimePeriodCollection *collectionCopy = [collection copy];
|
||||
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
__block BOOL innerMatch = NO;
|
||||
__block NSInteger matchIndex = 0; //We will remove matches to account for duplicates and to help speed
|
||||
for (int ii = 0; ii < collectionCopy.count; ii++) {
|
||||
if ([obj isEqualToPeriod:collectionCopy[ii]]) {
|
||||
innerMatch = YES;
|
||||
matchIndex = ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//If there was a match found, stop
|
||||
if (!innerMatch) {
|
||||
isEqual = NO;
|
||||
*stop = YES;
|
||||
}
|
||||
else {
|
||||
[collectionCopy removeTimePeriodAtIndex:matchIndex];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
return isEqual;
|
||||
}
|
||||
|
||||
#pragma mark - Helper Methods
|
||||
|
||||
-(void)updateVariables{
|
||||
//Set helper variables
|
||||
__block NSDate *startDate = [NSDate distantFuture];
|
||||
__block NSDate *endDate = [NSDate distantPast];
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
if ([((DTTimePeriod *) obj).StartDate isEarlierThan:startDate]) {
|
||||
startDate = ((DTTimePeriod *) obj).StartDate;
|
||||
}
|
||||
if ([((DTTimePeriod *) obj).EndDate isLaterThan:endDate]) {
|
||||
endDate = ((DTTimePeriod *) obj).EndDate;
|
||||
}
|
||||
}];
|
||||
|
||||
//Make assignments after evaluation
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
}
|
||||
|
||||
-(void)setVariablesNil{
|
||||
//Set helper variables
|
||||
StartDate = nil;
|
||||
EndDate = nil;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of DTTimePeriodCollection that is an exact copy of the receiver, but with differnt memory references, etc.
|
||||
*
|
||||
* @return DTTimePeriodCollection
|
||||
*/
|
||||
-(DTTimePeriodCollection *)copy{
|
||||
DTTimePeriodCollection *collection = [DTTimePeriodCollection collection];
|
||||
|
||||
[periods enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
[collection addTimePeriod:[obj copy]];
|
||||
}];
|
||||
|
||||
return collection;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,62 @@
|
|||
// 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
|
|
@ -0,0 +1,234 @@
|
|||
// 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
|
|
@ -0,0 +1,89 @@
|
|||
/* 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
|
Binary file not shown.
|
@ -0,0 +1,71 @@
|
|||
/* 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" = "тази година";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,80 @@
|
|||
/* 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
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,80 @@
|
|||
/* 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
|
|
@ -0,0 +1,106 @@
|
|||
/* 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";
|
||||
|
||||
"周一" = "星期一";
|
||||
"周二" = "星期二";
|
||||
"周三" = "星期三";
|
||||
"周四" = "星期四";
|
||||
"周五" = "星期五";
|
||||
"周六" = "星期六";
|
||||
"周日" = "星期日";
|
|
@ -0,0 +1,80 @@
|
|||
/* 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
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,80 @@
|
|||
/* 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";
|
Binary file not shown.
|
@ -0,0 +1,89 @@
|
|||
/* 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
|
|
@ -0,0 +1,71 @@
|
|||
/* 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" = "השנה";
|
|
@ -0,0 +1,89 @@
|
|||
/* 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
|
|
@ -0,0 +1,44 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,90 @@
|
|||
/* 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
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/* 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" = "올해";
|
|
@ -0,0 +1,24 @@
|
|||
"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";
|
|
@ -0,0 +1,89 @@
|
|||
/* 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
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,80 @@
|
|||
/* 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)
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
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" = "В этом году";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,89 @@
|
|||
/* 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
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,80 @@
|
|||
/* 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
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
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" = "Цього року";
|
|
@ -0,0 +1,71 @@
|
|||
/* 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";
|
|
@ -0,0 +1,97 @@
|
|||
/* 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" = "星期日";
|
||||
|
||||
"周一" = "星期一";
|
||||
"周二" = "星期二";
|
||||
"周三" = "星期三";
|
||||
"周四" = "星期四";
|
||||
"周五" = "星期五";
|
||||
"周六" = "星期六";
|
||||
"周日" = "星期日";
|
|
@ -0,0 +1,97 @@
|
|||
/* 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" = "星期日";
|
||||
|
||||
"周壹" = "星期壹";
|
||||
"周二" = "星期二";
|
||||
"周三" = "星期三";
|
||||
"周四" = "星期四";
|
||||
"周五" = "星期五";
|
||||
"周六" = "星期六";
|
||||
"周日" = "星期日";
|
|
@ -0,0 +1,29 @@
|
|||
// 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"
|
|
@ -0,0 +1,5 @@
|
|||
struct DateToolsObjC {
|
||||
|
||||
let originalOwner = "Matthew York"
|
||||
let originalRepo = "https://github.com/MatthewYork/DateTools"
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
// 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
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
|||
import XCTest
|
||||
@testable import DateToolsObjC
|
||||
|
||||
class DateToolsObjCTests: XCTestCase {
|
||||
func testOriginal() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
XCTAssertEqual(DateToolsObjC().originalOwner, "Matthew York")
|
||||
XCTAssertEqual(DateToolsObjC().originalRepo, "https://github.com/MatthewYork/DateTools")
|
||||
}
|
||||
|
||||
|
||||
static var allTests = [
|
||||
("testOriginal", testOriginal),
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import XCTest
|
||||
@testable import DateToolsObjCTests
|
||||
|
||||
XCTMain([
|
||||
testCase(DateToolsObjCTests.allTests),
|
||||
])
|
Loading…
Reference in New Issue