Use our API Services to tap into timeanddate.com's databases and integrate our data into your applications
- astronomy – Get Information About Astronomical Objects.
- astrodata – Calculate data on Astronomical Objects on Specific Times.
- businessdate – Calculate business date from a given number of days.
- businessduration – Calculate business days in a specified date range.
- converttime – Convert Time Between Time Zones.
- dstlist – Retrieve Daylight Saving Time Information.
- holidays – Retrieve List of Holidays.
- places – Retrieve List of Available Places.
- timeservice – Retrieve Current Time for Place.
The requests created by this library use the an expiry date, 60s from creation.
- iOS 12.0+ / macOS 10.14+
- Xcode 11+
- Swift 5.1+
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate TadApi into your Xcode project using Carthage, specify it in your Cartfile
:
github "TimeAndDate/TadApi"
CocoaPods a popular dependency manager. Using the command pod 'libtad-swift', '~> 1.0'
to add this library to your podfile.
let astronomyService = AstronomyService(accessKey: "[YOUR_ACCESS_KEY]", secretKey:"[YOUR_SECRET_KEY]")
let astronomyRequest = AstronomyRequest()
astronomyRequest.objects = "sun"
astronomyRequest.placeId = "norway/oslo"
astronomyService.getAstronomicalInfo(request:astronomyRequest) { (result, error) in
print(result)
}
TadApi is owned and maintained by the Time and Date AS. You can visit our API Reference at timeanddate.com for project updates and releases.