B4A Library Simple Lunar Library

Well, that's a Chinese Lunar Library,
It's just convert milliseconds value to Chinese lunar calendar date。
e.g. the DateTime.Now

The function is still very simple, although can be used basically.
However, let's update it later.

The App Use of this library:
TIM图片20180905125208.jpg

Basic Usage:
B4X:
    Dim b As LunarLib  
    Dim c As Lunar =b.converterDate(DateTime.Now)
    Log(c.Day)

    Log(c.lyear & " " & c.lmonth & " "  & c.lday)
    Log(c.toString)
    Log(c.Month & "月" & c.Day)

The Result:
农历类使用方法.png snipaste20180904_194325.png


Any suggestion is welcome,
I'm new to compile library, Thx =D
 

Attachments

  • LunarLib_r.zip
    4.8 KB · Views: 416
Last edited:

LucaMs

Expert
Licensed User
Longtime User
Thank you for sharing.

It's just convert microsecond
milliseconds


I took a look at the Chinese forum: really strange. That's why your thread is more appreciable.


Of course you should be a genius at least 10 times more than Erel:
upload_2018-9-5_7-15-37.png


7 years old! :eek:

:)



[At the age of 7 I only knew the "multiplication tables" (but only because at that time there were no smartphones :p]
 

52manhua

Member
Licensed User
Longtime User
Thank you for sharing.


milliseconds


I took a look at the Chinese forum: really strange. That's why your thread is more appreciable.


Of course you should be a genius at least 10 times more than Erel:
View attachment 71898

7 years old! :eek:

:)Well, its my son's age



[At the age of 7 I only knew the "multiplication tables" (but only because at that time there were no smartphones :p]


well, it's my son's age = )

and thank you.
 

52manhua

Member
Licensed User
Longtime User
AS I tested when using DateTime.DateParse("xx/xx/xxxx") code the value should add 1000 or upper to make the result right,

Otherwise the Lunar.Day is one day earilier,

It should be fixed in next version.

For now ,just type:
B4X:
converterDate(DateTime.DateParse("xx/xx/xxxx") + 1000)
 
Top