GithubHelp home page GithubHelp logo

mrsunx / lunar-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from houhanglei/lunar-ios

0.0 0.0 0.0 208 KB

基于Lunar封装的iOS版本,支持Objective-C和Swift。

License: MIT License

Ruby 0.31% Swift 99.69%

lunar-ios's Introduction

Lunar-iOS

Version SPM LICENSE Platform iOSVersion

介绍

基于Lunar封装的iOS版本,支持Objective-CSwift

示例

对象初始化方法(例,阴历对象)

// Lunar
var d = Lunar.fromYmd(1986, 4, 21);
// Swift
var d = Lunar(year: 1986, month: 4, day: 21)
// OC
Lunar *d = [[Lunar alloc] initWithYear:1986 month:4 day:21];

调用方法(方法名和Lunar中一样)

// Lunar
var d = Lunar.fromYmd(1986, 4, 21);
d.toFullString()
// Swift
var d = Lunar(year: 1986, month: 4, day: 21)
d.toFullString()
// OC
Lunar *d = [[Lunar alloc] initWithYear:1986 month:4 day:21];
[d toFullString];

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CocoaPods

Add the following entry to your Podfile:

pod 'Lunar-iOS'

Swift Package Manager

To integrate using Apple's Swift package manager, add the following as a dependency to your Package.swift:

.package(url: "https://github.com/HouHangLei/Lunar-iOS.git", .upToNextMajor(from: "1.2.33.5"))

License

Lunar-iOS is available under the MIT license. See the LICENSE file for more info.

lunar-ios's People

Contributors

avod-lit avatar houhanglei avatar mrsunx avatar

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.