added FOUNDATION_EXPORT for const NSIntegers

This commit is contained in:
Maciej Walczynski
2015-07-15 12:46:20 +02:00
parent 1a8695376c
commit 92c6b1bfe1
2 changed files with 16 additions and 8 deletions

View File

@@ -49,28 +49,28 @@ typedef NS_ENUM(NSInteger, MTDateHourFormat) {
*/
// This is exact.
static NSInteger const MTDateConstantSecondsInMinute = 60;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInMinute;
// This is exact.
static NSInteger const MTDateConstantSecondsInHour = 60 * 60;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInHour;
// This is not always true. Leap year/DST.
static NSInteger const MTDateConstantSecondsInDay = 60 * 60 * 24;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInDay;
// This is not always true. Leap year/DST.
static NSInteger const MTDateConstantSecondsInWeek = 60 * 60 * 24 * 7;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInWeek;
// This is an approximation and rarely true.
static NSInteger const MTDateConstantSecondsInMonth = 60 * 60 * 24 * 7 * 30;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInMonth;
// This is true 3 out of 4 years. Leap years have 366 days.
static NSInteger const MTDateConstantSecondsInYear = 60 * 60 * 24 * 7 * 365;
FOUNDATION_EXPORT NSInteger const MTDateConstantSecondsInYear;
// This is exact.
static NSInteger const MTDateConstantDaysInWeek = 7;
FOUNDATION_EXPORT NSInteger const MTDateConstantDaysInWeek;
// This is not always true. Daylight savings time can increate/decrease a days hours by 1.
static NSInteger const MTDateConstantHoursInDay = 24;
FOUNDATION_EXPORT NSInteger const MTDateConstantHoursInDay;

View File

@@ -26,6 +26,14 @@ static MTDateWeekNumberingSystem __weekNumberingSystem = 0;
static NSDateFormatterStyle __dateStyle = NSDateFormatterShortStyle;
static NSDateFormatterStyle __timeStyle = NSDateFormatterShortStyle;
NSInteger const MTDateConstantSecondsInMinute = 60;
NSInteger const MTDateConstantSecondsInHour = 60 * 60;
NSInteger const MTDateConstantSecondsInDay = 60 * 60 * 24;
NSInteger const MTDateConstantSecondsInWeek = 60 * 60 * 24 * 7;
NSInteger const MTDateConstantSecondsInMonth = 60 * 60 * 24 * 7 * 30;
NSInteger const MTDateConstantSecondsInYear = 60 * 60 * 24 * 7 * 365;
NSInteger const MTDateConstantDaysInWeek = 7;
NSInteger const MTDateConstantHoursInDay = 24;
+ (NSDateFormatter *)mt_sharedFormatter
{