All Projects → HuangDayu → Almanac

HuangDayu / Almanac

Licence: Apache-2.0 license
Almanac 历

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Almanac

diversity-index
A curated Diversity-Index of grants, scholarships and FA that encourages diversity in STEM fields aimed at half the world's population, Women!
Stars: ✭ 60 (+93.55%)
Mutual labels:  stem
UltraWeekCalendar
UltraWeekCalendar - Clean UI to select day through weeks
Stars: ✭ 29 (-6.45%)
Mutual labels:  calendar
shamsi date
A Flutter and Dart package for using Jalali (Shamsi, Solar, Persian or Jalaali) calendar. You can convert, format and manipulate Jalali and Gregorian (Miladi) date and times.
Stars: ✭ 59 (+90.32%)
Mutual labels:  calendar
torgo
A Golang library for Tor.
Stars: ✭ 36 (+16.13%)
Mutual labels:  stem
lunar-typescript
日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.
Stars: ✭ 62 (+100%)
Mutual labels:  calendar
ical
📅 Golang iCalendar lexer/parser implementing RFC 5545
Stars: ✭ 28 (-9.68%)
Mutual labels:  calendar
CubeSatSim
CubeSatSim, the AMSAT CubeSat Simulator
Stars: ✭ 201 (+548.39%)
Mutual labels:  stem
spx
spx - A Go+ 2D Game Engine for STEM education
Stars: ✭ 72 (+132.26%)
Mutual labels:  stem
Android-Alarm
This repository is an Alarm application, demonstrate how to use multiple pending intent to set alarm's time wake up. use popup menu, RecyclerView Adapter, use SQLite to store data
Stars: ✭ 25 (-19.35%)
Mutual labels:  calendar
THCalendar
Calendar like iOS
Stars: ✭ 21 (-32.26%)
Mutual labels:  calendar
colabs
This repository holds the Google Colabs for the EdX TinyML Specialization
Stars: ✭ 73 (+135.48%)
Mutual labels:  stem
GCCalendar
A customizable calendar view for iOS 9+ written in Swift.
Stars: ✭ 53 (+70.97%)
Mutual labels:  calendar
aircal
Visualize Airflow's schedule by exporting future DAG runs as events to Google Calendar.
Stars: ✭ 66 (+112.9%)
Mutual labels:  calendar
open
🖥️ 🚀 Fiveable's Open Source Initiative. Showcasing projects and exposing others to the world of OSS.
Stars: ✭ 22 (-29.03%)
Mutual labels:  stem
RaspberryPi-WeatherStation
7.5 ePaper Waveshare Outlook WeatherStation 墨水屏台历
Stars: ✭ 30 (-3.23%)
Mutual labels:  calendar
BlocklyArduinoIDEPlugin
Blockly@rduino Arduino IDE plugin to add and interact with
Stars: ✭ 20 (-35.48%)
Mutual labels:  stem
yii2-fullcalendar-scheduler
Yii 2 component for easy fullcalendar scheduler integration
Stars: ✭ 24 (-22.58%)
Mutual labels:  calendar
chinese-calendar
🔖 Chinese calendar control in C#
Stars: ✭ 22 (-29.03%)
Mutual labels:  calendar
react-calendar
A Calendar made with React and Redux with reminders and different months
Stars: ✭ 35 (+12.9%)
Mutual labels:  calendar
SUCAL
Sorbonne Université calendar
Stars: ✭ 14 (-54.84%)
Mutual labels:  calendar

Almanac 历

GitHub watch GitHub issues GitHub forks GitHub stars LICENSE Badge

本项目类似寿星天文历日梭万年历,包括但不限皇历、生辰八字、日出月落、农历、黄历、干支、节气、月相、经纬度、节假日、伊斯兰历、儒略历、天文历、回历、西历等。

引入依赖

<dependency>
    <groupId>cn.huangdayu</groupId>
    <artifactId>almanac</artifactId>
    <version>20211128</version>
</dependency>

使用示例

/**
 * 日历
 *
 * @param timeZoneDTO
 * @return
 */
AlmanacUtils.ofDay(new TimeZoneDTO("广东省","徐闻县",Calendar.getInstance()));

/**
 * 月历
 *
 * @param timeZoneDTO
 * @return
 */
AlmanacUtils.ofMonth(new TimeZoneDTO("广东省","徐闻县",Calendar.getInstance()));

/**
 * 集成抽象类的用法
 */
public class AlmanacApp extends Almanac {

    public static void main(String[] args) {
        Almanac almanac = new AlmanacApp();
        AlmanacDTO almanacDTO = almanac.ofYear()[7][11];
        TestUtils.pakMap(almanacDTO);
        for (Map.Entry<String, String> entry : TestUtils.MAP.entrySet()) {
            System.out.println(entry.getKey() + entry.getValue());
        }
    }

    @Override
    public TimeZoneDTO initTimeZone() {
        return new TimeZoneDTO("广东省","徐闻县", "2021-01-29 11:13:29");
    }
}

不足

  • 算法并不完全准确
  • 时间无法进入公元前
  • 天文历信息不足:方位、赤纬、时角、黄经、黄纬,潮汐,太阳高度角,地球直射位置,地球远日点,地球近日点,日食月食等

展示

key value value value
日期 2018年11月01日 1995年08月12日 0001年01月01日
时间 11时06分48秒667毫秒 11时10分10秒00毫秒 11时10分10秒00毫秒
星期 星期四 星期六 星期一
地点 广东 徐闻 广东 徐闻 广东 徐闻
年号 [当代]新中国 公历纪元2018年 [当代]新中国 公历纪元1995年 [西汉]平帝 刘衍 元始1年
农历 戊戌狗年玖月廿四 乙亥猪年柒月十七 庚申鸡年冬月十八
时辰 午时 午时 午时
黄历 戊戌年壬戌月丁酉日丙午时 乙亥年甲申月乙亥日壬午时 庚申年戊子月丁丑日丙午时
天干 戊壬丁丙 乙甲乙壬 庚戊丁丙
地支 戌戌酉午 亥申亥午 申子丑午
八字 戊戌壬戌丁酉丙午 乙亥甲申乙亥壬午 庚申戊子丁丑丙午
回历 1440年2月21日 1416年3月15日 -640年5月16日
儒略日 2458424 2449942 1721426
黄帝纪年 开元4716年 开元4693年 开元2698年
生肖
节假日 一九第8天
经度 东经 110°16'67" 东经 110°16'67" 东经 110°16'67"
纬度 北纬 20°33'33" 北纬 20°33'33" 北纬 20°33'33"
时区 +0800 东八区 +0800 东八区 +0800 东八区
港口 乌石港 乌石港 乌石港
昼长 11:22:55 12:52:48 10:54:50
夜长 12:37:04 11:07:11 13:05:09
天亮 06:18:41 05:55:05 06:50:20
日出 06:41:27 06:18:10 07:14:22
中天 12:22:54 12:44:34 12:41:47
日落 18:04:22 19:10:58 18:09:12
天黑 18:27:07 19:34:03 18:33:14
月出 00:13:02 20:13:13 03:35:37
月中 06:55:44 13:52:54 09:30:08
月落 13:38:27 07:32:35 15:24:39
月相 下弦 00:40:14
月天数 30天 30天 30天
大月否
闰月否
闰年否
星座 天蝎座 狮子座 摩羯座
下一节气 2018-11-07 19:31:39 立冬 1995-08-23 22:34:50 处暑 1-01-06 20:41:46 小寒
春分 2018-03-21 00:15:24 1995-03-21 10:14:27 1-03-23 05:43:49
夏至 2018-06-21 18:07:12 1995-06-22 04:34:22 1-06-25 04:53:32
秋分 2018-09-23 09:54:01 1995-09-23 20:13:00 1-09-25 15:39:49
冬至 2018-12-22 06:22:38 1995-12-22 16:16:47 1-12-23 08:19:28

Almanac Application

演示

设置日期 设置时间 设置位置

下载

源码

参考文献

在线工具

相关开源

日历文献

回馈开源

License

Copyright 2017-12-4 huangdayu

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].