Code Monkey home page Code Monkey logo

sweetdate's Introduction

SweetDate

A small iOS framework to better handle Swift Dates and Time operations.

Getting Started

SweetDate is a work in progress, in the mean time you can enjoy the nice improvements it can offer to your coding environment.

Installing with CocoaPods

To integrate SweetDate into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'SweetDate'
end

Then, run the following command:

$ pod install

End with an example of getting some data out of the system or using it for a little demo

Usage

SweetDate makes it easy for you to create Date Types with common sense coding scenarios.

Date Format

SweetDate supports the 3 most popular worldwide formats:

Format Description
.mdy Month - Day - Year
.dmy Day - Month - Year
.ymd Year - Month - Day

Create a Date from a String value

You can create a date value by calling the dateWithFormat method after any string declaration. You only need to specify the date format.

"12-02-2017".dateWithFormat(Format: .mdy)

Create a Date from a String Statically

You can create a date value by calling the fromString method after any static call to the "Date" Data Type. You only need to specify the date String and the date format.

Date.fromString(Date: "12-02-2017", Format: .mdy)

License

This project is licensed under the MIT License - see the LICENSE file for details

sweetdate's People

Contributors

adolfogarza avatar

Stargazers

 avatar Carabineiro avatar  avatar

Watchers

James Cloos avatar Carabineiro avatar  avatar

Forkers

carabina

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.