Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🕟 Generate the emoji clock face, moon phase 🌗 , or zodiac sign ♉ 🐶 for a given time

License

NotificationsYou must be signed in to change notification settings

Philippus/emoji-clock

Repository files navigation

buildcodecovCurrent VersionLicense

Emoji-clock can, when given a date-time, generate the applicable emoji short code for:

  • clock faces
  • lunar phases
  • (tropical) zodiac signs
  • chinese zodiac signs

To view the emoji itself you will need an emoji library such asLightbend Emoji.

Installation

Emoji-clock is published for Scala 2.12 and 2.13. To start using it add the following to yourbuild.sbt:

libraryDependencies += "nl.gn0s1s" %% "emoji-clock" % "0.3.1"

Example usage

Follow the Lightbend Emojiinstallation instructions also for these examples:

importnl.gn0s1s.emojiclock.EmojiClockimportcom.lightbend.emoji.ShortCodes.Defaults._importcom.lightbend.emoji.ShortCodes.Implicits._EmojiClock.clockFaceShortCode(java.time.LocalDateTime.of(2018,1,31,1,50))// res0: String = clock2EmojiClock.clockFaceShortCode(java.time.LocalDateTime.of(2018,1,31,1,50)).emoji// res1: com.lightbend.emoji.Emoji = 🕑EmojiClock.now()// at 16:44// res2: String = clock430EmojiClock.now().emoji// res3: com.lightbend.emoji.Emoji = 🕟
importnl.gn0s1s.emojiclock.EmojiLunarPhaseimportcom.lightbend.emoji.ShortCodes.Defaults._importcom.lightbend.emoji.ShortCodes.Implicits._EmojiLunarPhase.lunarPhaseShortCode(java.time.LocalDateTime.of(2018,1,31,0,0))// res0: String = full_moonEmojiLunarPhase.lunarPhaseShortCode(java.time.LocalDateTime.of(2017,12,10,0,0)).emoji// res1: com.lightbend.emoji.Emoji = 🌗EmojiLunarPhase.now()// at 1st December 2017// res2: String = full_moonEmojiLunarPhase.now().emoji// res3: com.lightbend.emoji.Emoji = 🌕
importnl.gn0s1s.emojiclock.EmojiZodiacSignimportcom.lightbend.emoji.ShortCodes.Defaults._importcom.lightbend.emoji.ShortCodes.Implicits._EmojiZodiacSign.zodiacSignShortCode(java.time.LocalDateTime.of(2018,1,31,0,0))// res0: String = aquariusEmojiZodiacSign.zodiacSignShortCode(java.time.LocalDateTime.of(2017,5,5,0,0)).emoji// res1: com.lightbend.emoji.Emoji = ♉EmojiZodiacSign.now()// at 2nd December 2017// res2: String = sagittariusEmojiZodiacSign.now().emoji// res3: com.lightbend.emoji.Emoji = ♐
importnl.gn0s1s.emojiclock.EmojiChineseZodiacimportcom.lightbend.emoji.ShortCodes.Defaults._importcom.lightbend.emoji.ShortCodes.Implicits._EmojiChineseZodiac.chineseZodiacSignShortCode(java.time.LocalDateTime.of(2018,1,31,0,0))// res0: String = roosterEmojiChineseZodiac.chineseZodiacSignShortCode(java.time.LocalDateTime.of(2015,5,5,0,0)).emoji// res1: com.lightbend.emoji.Emoji = 🐐EmojiChineseZodiac.now()// at 1st January 2019// res2: String = dogEmojiChineseZodiac.now().emoji// res3: com.lightbend.emoji.Emoji = 🐶

sbt-prompt

inexamples/sbt-prompt you can see how you could add an emoji clock to yoursbt-prompt.

Links

License

The code is available under theMIT license.

About

🕟 Generate the emoji clock face, moon phase 🌗 , or zodiac sign ♉ 🐶 for a given time

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp