Swift Package Index


Last library of 平成.


  • The latest stable release is 0.0.1. Released over 1 year ago.
  • The last commit to master was over 1 year ago.

Swift Version Compatibility

  • 0.0.1 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.0.1 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

EraCalculator

Last library of 平成. So, in Japan change era. This library is my memorial library.

Usage

EraCalculator can convert other Era years. This example is Calculates what year of 大化 was when the 平成 was 大化.

let expected = Era(eraType: .大化, year: 1345)
let got = EraType.平成.convert(to: EraType.大化)
XCTAssertEqual(got.eraType, expected.eraType)
XCTAssertEqual(got.year, expected.year)
XCTAssertEqual(got.description, "大化 1345年")

LICENSE

EraCalculator is available under the MIT license. See the LICENSE file for more info.