🕐 Format your dates/times as emojis.

Overview

Swift Swift Package Manager compatible Carthage compatible

EmojiTimeFormatter

Format your dates/times as emojis 🕟 🕑 🕗

Description

You can build easy to understand user interfaces with EmojiTimeFormatter or can do funny things like that:

Screencast

The example is accessable via Power of Emojis.

Installation

EmojiTimeFormatter supports multiple methods for installing the library in a project. You can find the latest version in the release tab.

Installation with Swift Package Manager

To integrate EmojiTimeFormatter into your Xcode project using Swift Package Manager, specify it in your Package.swift file:

import PackageDescription

let package = Package(
    [...]
    dependencies: [
        .Package(url: "https://github.com/thomaspaulmann/EmojiTimeFormatter.git", majorVersion: XYZ)
    ]
)

Installation with Carthage

To integrate EmojiTimeFormatter into your Xcode project using Carthage, specify it in your Cartfile:

github "thomaspaulmann/EmojiTimeFormatter" ~> X.Y.Z

Run carthage update --toolchain com.apple.dt.toolchain.XcodeDefault to build the framework and drag the built EmojiTimeFormatter.framework into your Xcode project. It's important to specify your toolchain in the Xcode beta builds.

Installation without anything

To integrate EmojiTimeFormatter into your Xcode project using nothing but your hands, copy the Sources folder to your Xcode project. It's only two files and 200 lines of code.

Usage

You can convert dates to clock face emojis and vice versa.

Date to Emoji

Create a new EmojiTimeFormatter, get the ClockFaceEmoji for your Date and print it. It's that simple.

let now = Date()
let formatter = EmojiTimeFormatter()
let clockFaceEmoji = formatter.clockFace(from: now)

print("It's \(clockFaceEmoji) o'clock.") // Output: It's 🕢 o'clock.

Emoji to Date

It's also possible to convert a ClockFaceEmoji back to a Date. Create a new EmojiTimeFormatter, get the Date for your ClockFaceEmoji and print it. It's that simple, again.

let twelveThirty = ClockFaceEmoji.twelveThirty
let formatter = EmojiTimeFormatter()
let date = formatter.date(from: twelveThirty)

print("It's \(date).") // Output: It's 1970-01-01 00:30:00 +0000.

Note: Actually it's not a date, it's a time relative to 00:00:00 UTC on 1 January 1970.

License

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

You might also like...
Get the current frequency of your Apple M1 GPU.

M1-gpufreq Get the current frequency of your Apple M1 GPU. What It Does and How It Works This project is designed to get the current frequency (or clo

This app will hlep you realize if the job you are doing, truly is worth your time
This app will hlep you realize if the job you are doing, truly is worth your time

Worth Your Time Is working for your current pay really worth your time? This app will hlep you realize if the job you are doing, truly is worth your t

Time Lines - Know when all your friends, colleagues, and family are
Time Lines - Know when all your friends, colleagues, and family are

Time Lines Know when all your friends, colleagues, and family are. Time Lines is a practical app to know when all your friends, colleagues and family

Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse
Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse

Date Formatter Pool Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse Installation is available i

Dates and times made easy in iOS
Dates and times made easy in iOS

DateTools DateTools was written to streamline date and time handling in iOS. Classes and concepts from other languages served as an inspiration for Da

Custom emojis are a fun way to bring more life and customizability to your apps.
Custom emojis are a fun way to bring more life and customizability to your apps.

Custom emojis are a fun way to bring more life and customizability to your apps. They're available in some of the most popular apps, such as Slack, Di

 🤯 PickEmoji: A SwiftUI Extension to Pick the Emojis that you wish
🤯 PickEmoji: A SwiftUI Extension to Pick the Emojis that you wish

🤯 PickEmoji: A SwiftUI Extension to Pick the Emojis that you wish You can use this library in your projects 🙃 . You can search the emojis too. Below

A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.
A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.

This repository is now maintained as JoyPixels/emoji-toolkit. You'll find the latest version of our resources at emoji-toolkit. Please see the UPGRADE

🛍 Create shopping lists with emojis!

Mojilist 🛍 Create shopping lists with emojis! About Read more about this project at my blog post. License Copyright 2018 (c) Thiago Ricieri Licensed

Tap to swap out words with emojis. Inspired by Messages.app on iOS 10.
Tap to swap out words with emojis. Inspired by Messages.app on iOS 10.

EmojiTextView Tap to swap out words with emojis. Works with any UITextView. Heavily inspired by Messages.app on iOS 10. Created by Arkadiusz Holko (@a

DateHelper - A high performant Swift Date Extension for creating, converting, comparing, or modifying dates.
DateHelper - A high performant Swift Date Extension for creating, converting, comparing, or modifying dates.

DateHelper A high performant Swift Date Extension for creating, converting, comparing, or modifying dates. Capabilities Creating a Date from a String

SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift. What's This? SwiftDate is the definitive toolchain to ma

A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.

ISO 8601: The only date format worth using Obligatory relevant xkcd: How to use this code in your program Add the source files to your project. Parsin

Google Photos "takeout" doesn't retain created/modified dates of media.

GoogleTakeoutMediaDateCorrector Google Photos "takeout" doesn't retain created/modified dates of media. At least they do export this in a separate jso

A lightweight Swift date library for parsing, validating, manipulating, and formatting dates based on moment.js.

A lightweight Swift date library for parsing, validating, manipulating, and formatting dates based on moment.js.

A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.
A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.

A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.

Punctual - Swift dates, more fun. Heavily inspired by ObjectiveSugar

Punctual Swift dates, more fun. Heavily inspired by ObjectiveSugar Installation Punctual is available through the Swift Package Manager! Just add this

A Swift micro library for generating Sunrise and Sunset times.

Solar A Swift helper for generating Sunrise and Sunset times. Solar performs its calculations locally using an algorithm from the United States Naval

Releases(1.0.5)
Owner
Thomas Paul Mann
Make things for people who make things.
Thomas Paul Mann
DateHelper - A high performant Swift Date Extension for creating, converting, comparing, or modifying dates.

DateHelper A high performant Swift Date Extension for creating, converting, comparing, or modifying dates. Capabilities Creating a Date from a String

Melvin Rivera 1.4k Jan 2, 2023
SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift. What's This? SwiftDate is the definitive toolchain to ma

Daniele Margutti 7.2k Jan 4, 2023
A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.

ISO 8601: The only date format worth using Obligatory relevant xkcd: How to use this code in your program Add the source files to your project. Parsin

Peter Hosey 601 Sep 4, 2022
Punctual - Swift dates, more fun. Heavily inspired by ObjectiveSugar

Punctual Swift dates, more fun. Heavily inspired by ObjectiveSugar Installation Punctual is available through the Swift Package Manager! Just add this

Harlan Haskins 321 Jun 30, 2022
A Swift micro library for generating Sunrise and Sunset times.

Solar A Swift helper for generating Sunrise and Sunset times. Solar performs its calculations locally using an algorithm from the United States Naval

Chris Howell 493 Dec 25, 2022
Custom Time Picker ViewController with Selection of start and end times in Swift 🔶

LFTimePicker Custom Time Picker ViewController with Selection of start and end times in Swift ?? . Based on Adey Salyard's design @ Dribbble One to tw

Awesome Labs 65 Nov 11, 2022
Typical master detail SAMPLE application written in Swift to test NY Times Most Popular API

NYTimes-Demo: Typical master detail SAMPLE application written in Swift to test NY Times Most Popular API. This SAMPLE application is written in Swift

Atif Naveed 0 Nov 3, 2021
Create your own faces for watchOS. Customize the watch hands, layout, colors, and images. Edit faces on your phone and switch them on the watch.

AppleWatchFaces Design your own watch faces for the apple watch. They are not real watch faces, but a watchOS app running on the watch that tells you

Mike Hill 395 Oct 20, 2022
A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.

TimeZonePicker A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your

Gligor Kotushevski 125 Dec 13, 2022
A timer that lets you know when your ramen is ready to eat!

Dependencies Ramen Timer requires the following: Gifu SwiftySound On Xcode simply go to File > Add Packages and input the names on the searchbar then

Angel Santiago 1 Nov 3, 2021