This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "EpochConverter" | ||
s.version = "1.0" | ||
s.summary = "Epoch Converter for iOS and OSX" | ||
s.homepage = "https://github.com/quver/EpochConverter" | ||
s.license = "MIT" | ||
s.author = { "Pawel Bednorz" => "pawel@quver.pl" } | ||
s.social_media_url = "http://twitter.com/plquver" | ||
s.ios.deployment_target = "8.0" | ||
s.osx.deployment_target = "10.10" | ||
s.source = { :git => "https://github.com/quver/EpochConverter.git", :tag => s.version } | ||
s.public_header_files = "EpochConverter/EpochConverter.h" | ||
s.source_files = "EpochConverter/EpochConverter.h" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,53 @@ | ||
EpochConverter | ||
============== | ||
# EpochConverter | ||
|
||
[![Build Status](https://travis-ci.org/quver/EpochConverter.svg)](https://travis-ci.org/quver/EpochConverter) | ||
[![Coverage Status](https://coveralls.io/repos/github/quver/EpochConverter/badge.svg?branch=master)](https://coveralls.io/github/quver/EpochConverter?branch=master) | ||
[![GitHub license](https://img.shields.io/github/license/quver/AESHelper.svg)]() | ||
[![Platform](https://img.shields.io/cocoapods/p/EpochConverter.svg?style=flat)](http://cocoapods.org/pods/EpochConverter) | ||
[![Version](https://img.shields.io/cocoapods/v/EpochConverter.svg?style=flat)](http://cocoapods.org/pods/EpochConverter) | ||
|
||
|
||
## Instalation | ||
``` | ||
pod 'EpochConverter', '~>1.0' | ||
``` | ||
|
||
## Using | ||
|
||
### Today case | ||
Init with today date (eg. 1 Januar 2016 00:00:00) | ||
|
||
```objective-c | ||
EpochConverter *converter = [EpochConverter alloc] init]; | ||
``` | ||
|
||
### Choosen day case | ||
```objective-c | ||
EpochConverter *converter = [EpochConverter alloc] initWithEpoch:1451602800]; | ||
``` | ||
|
||
|
||
### Available properties | ||
|
||
```objective-c | ||
NSInteger baseEpoch; | ||
NSInteger weekDay; | ||
NSInteger firstWeekDay; | ||
NSInteger lastWeekDay; | ||
``` | ||
|
||
### Available class methods | ||
|
||
```objective-c | ||
+ (NSInteger)firstWeekDayForEpoch:(NSInteger)epoch; | ||
+ (NSInteger)lastWeekDayForEpoch:(NSInteger)epoch; | ||
+ (NSInteger)weekDayForEpoch:(NSInteger)epoch; | ||
``` | ||
|
||
## Author | ||
|
||
Paweł Bednorz, Quver.xyz | ||
|
||
## License | ||
|
||
EpochConverter is available under the MIT license. See the LICENSE file for more info |