emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to set a entry with Chinese calender?
@ 2009-04-30  7:54 Wei-Wei Guo
  2009-05-04 14:33 ` Carsten Dominik
  2009-05-04 15:07 ` Leo
  0 siblings, 2 replies; 12+ messages in thread
From: Wei-Wei Guo @ 2009-04-30  7:54 UTC (permalink / raw)
  To: emacs-orgmode

Dear all,

I want to make entries of my mum and dad's birthday by diary-anniversary. The problem
is their birthday is in Lunar calender (Chinese calender) fashion. Diary has things
like diary-julian-date, but I didn't find diary-chinese-something. Emacs calender
support chinese calender, although its calculation of month is not right.

Another question is how to set an entry of every Friday? I tried

    %%(diary-float t 5 t) Meeting.

It seems the last arg doesn't accept 't'.


Best wishes,
Wei-Wei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-04-30  7:54 How to set a entry with Chinese calender? Wei-Wei Guo
@ 2009-05-04 14:33 ` Carsten Dominik
  2009-05-04 15:07 ` Leo
  1 sibling, 0 replies; 12+ messages in thread
From: Carsten Dominik @ 2009-05-04 14:33 UTC (permalink / raw)
  To: Wei-Wei Guo; +Cc: emacs-orgmode


On Apr 30, 2009, at 9:54 AM, Wei-Wei Guo wrote:

> Dear all,
>
> I want to make entries of my mum and dad's birthday by diary- 
> anniversary. The problem
> is their birthday is in Lunar calender (Chinese calender) fashion.  
> Diary has things
> like diary-julian-date, but I didn't find diary-chinese-something.  
> Emacs calender
> support chinese calender, although its calculation of month is not  
> right.

I don't know how to handle chinese dates, sorry.

>
> Another question is how to set an entry of every Friday? I tried
>
>   %%(diary-float t 5 t) Meeting.

Take a look at diary-cyclic, or use

<2009-04-30 Fri +1w>

HTH

- Carsten

>
> It seems the last arg doesn't accept 't'.
>
>
> Best wishes,
> Wei-Wei
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-04-30  7:54 How to set a entry with Chinese calender? Wei-Wei Guo
  2009-05-04 14:33 ` Carsten Dominik
@ 2009-05-04 15:07 ` Leo
  2009-05-05 13:53   ` Wei-Wei Guo
  1 sibling, 1 reply; 12+ messages in thread
From: Leo @ 2009-05-04 15:07 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-04-30 08:54 +0100, Wei-Wei Guo wrote:
> Dear all,
>
> I want to make entries of my mum and dad's birthday by diary-anniversary. The problem
> is their birthday is in Lunar calender (Chinese calender) fashion. Diary has things
> like diary-julian-date, but I didn't find diary-chinese-something. Emacs calender
> support chinese calender, although its calculation of month is not right.
>
> Another question is how to set an entry of every Friday? I tried
>
>    %%(diary-float t 5 t) Meeting.
>
> It seems the last arg doesn't accept 't'.
>
>
> Best wishes,
> Wei-Wei

I ran into that question and have written a small package here:

http://article.gmane.org/gmane.emacs.sources/3066/match=diary+chinese

Best,
-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: How to set a entry with Chinese calender?
  2009-05-04 15:07 ` Leo
@ 2009-05-05 13:53   ` Wei-Wei Guo
  2009-05-05 15:00     ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Wei-Wei Guo @ 2009-05-05 13:53 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode

Leo 写道:

Hi Leo,

 >
 > I ran into that question and have written a small package here:
 >
 > http://article.gmane.org/gmane.emacs.sources/3066/match=diary+chinese
 >

Your package is great!

And I notice two bugs. I think it's not bugs of your package.

1. The calculation of Chinese year is right.

For example, if I born in 1982.11 of *solar* calendar and my father born
in 1952.12 of *lunar* calendar. My age is calculated as 27 and my father's
age is calculated as 58, which should be 57. Because my father's birthday
is in the next year of *solar* calender, his age is calculated one year
more.

2. Month of Chinese date is not right.

Due to the conversion of http://www.nongli.com/item3/searchNL.asp, 2009.5.5
is "己丑 戊辰 庚戌", but Emacs Calender gives :

Chinese date: Cycle 78, year 26 (己丑), month 4 (己巳), day 11 (庚戌)

It seems it converts one month late.


Best wishes,
Wei-Wei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-05-05 13:53   ` Wei-Wei Guo
@ 2009-05-05 15:00     ` Leo
  2009-05-05 23:32       ` Wei-Wei Guo
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2009-05-05 15:00 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-05-05 14:53 +0100, Wei-Wei Guo wrote:
> And I notice two bugs. I think it's not bugs of your package.

I assume you mean without loading cal-china-plus, the follow restults
still stand. Could you investigate more and report those bugs to
emacs-devel? The author of calendar.el is actually an expert in this
field, it is good to have him reviewing this.

> 1. The calculation of Chinese year is right.
>
> For example, if I born in 1982.11 of *solar* calendar and my father born
> in 1952.12 of *lunar* calendar. My age is calculated as 27 and my father's
> age is calculated as 58, which should be 57. Because my father's birthday
> is in the next year of *solar* calender, his age is calculated one year
> more.
> 
> 2. Month of Chinese date is not right.
>
> Due to the conversion of http://www.nongli.com/item3/searchNL.asp, 2009.5.5
> is "己丑 戊辰 庚戌", but Emacs Calender gives :
>
> Chinese date: Cycle 78, year 26 (己丑), month 4 (己巳), day 11 (庚戌)
>
> It seems it converts one month late.
>
>
> Best wishes,
> Wei-Wei

Best wishes,
-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: How to set a entry with Chinese calender?
  2009-05-05 15:00     ` Leo
@ 2009-05-05 23:32       ` Wei-Wei Guo
  2009-05-06  1:57         ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Wei-Wei Guo @ 2009-05-05 23:32 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode

Leo 写道:

Hi Leo,

> I assume you mean without loading cal-china-plus, the follow restults
> still stand. Could you investigate more and report those bugs to
> emacs-devel? The author of calendar.el is actually an expert in this
> field, it is good to have him reviewing this.
> 
>> 1. The calculation of Chinese year is not right.
>>
>> For example, if I born in 1982.11 of *solar* calendar and my father born
>> in 1952.12 of *lunar* calendar. My age is calculated as 27 and my father's
>> age is calculated as 58, which should be 57. Because my father's birthday
>> is in the next year of *solar* calender, his age is calculated one year
>> more.
>>

This bug cannot be reproduced without loading cal-china-plus for it uses the
diary-chinese-anniversary of your package. For example.

%%(diary-anniversary 11 1 1982) I'm %d years old.
%%(diary-chinese-anniversary 12 1 1952) Dad is %d years old.

Could you give me some hints on how to present the bug without your package?


Best wishes,
Wei-Wei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-05-05 23:32       ` Wei-Wei Guo
@ 2009-05-06  1:57         ` Leo
  2009-05-06  2:05           ` Leo
  2009-05-06  5:27           ` Wei-Wei Guo
  0 siblings, 2 replies; 12+ messages in thread
From: Leo @ 2009-05-06  1:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

On 2009-05-06 00:32 +0100, Wei-Wei Guo wrote:
>>> 1. The calculation of Chinese year is not right.
>>>
>>> For example, if I born in 1982.11 of *solar* calendar and my father born
>>> in 1952.12 of *lunar* calendar. My age is calculated as 27 and my father's
>>> age is calculated as 58, which should be 57. Because my father's birthday
>>> is in the next year of *solar* calender, his age is calculated one year
>>> more.
>>>
>
> This bug cannot be reproduced without loading cal-china-plus for it uses the
> diary-chinese-anniversary of your package. For example.
>
> %%(diary-anniversary 11 1 1982) I'm %d years old.
> %%(diary-chinese-anniversary 12 1 1952) Dad is %d years old.
>
> Could you give me some hints on how to present the bug without your package?

How do you make calendar show the age of your father?

I put %%(diary-chinese-anniversary 12 1 1952) in my diary file and on
2008.12.27 (solar calendar), it says '56 years old', isn't this correct?

There are different ways of counting ages. The diff var in the
diary-chinese-anniversary holds the age value.

Incidentally I found a bug in diary-chinese-anniversary. Could you test
the attached version?


[-- Attachment #2: cal-china-plus.el --]
[-- Type: application/emacs-lisp, Size: 9408 bytes --]

[-- Attachment #3: Type: text/plain, Size: 66 bytes --]


Thanks,
-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-05-06  1:57         ` Leo
@ 2009-05-06  2:05           ` Leo
  2009-05-06  5:27           ` Wei-Wei Guo
  1 sibling, 0 replies; 12+ messages in thread
From: Leo @ 2009-05-06  2:05 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-05-06 02:57 +0100, Leo wrote:

Those Chinese Characters became gibberish so I also posted it here
http://paste.lisp.org/display/79735.

-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: How to set a entry with Chinese calender?
  2009-05-06  1:57         ` Leo
  2009-05-06  2:05           ` Leo
@ 2009-05-06  5:27           ` Wei-Wei Guo
  2009-05-06  9:38             ` Leo
  1 sibling, 1 reply; 12+ messages in thread
From: Wei-Wei Guo @ 2009-05-06  5:27 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode

Leo 写道:
> On 2009-05-06 00:32 +0100, Wei-Wei Guo wrote:
>>>> 1. The calculation of Chinese year is not right.
>>>>
>>>> For example, if I born in 1982.11 of *solar* calendar and my father born
>>>> in 1952.12 of *lunar* calendar. My age is calculated as 27 and my father's
>>>> age is calculated as 58, which should be 57. Because my father's birthday
>>>> is in the next year of *solar* calender, his age is calculated one year
>>>> more.
>>>>
>> This bug cannot be reproduced without loading cal-china-plus for it uses the
>> diary-chinese-anniversary of your package. For example.
>>
>> %%(diary-anniversary 11 1 1982) I'm %d years old.
>> %%(diary-chinese-anniversary 12 1 1952) Dad is %d years old.
>>
>> Could you give me some hints on how to present the bug without your package?
> 
> How do you make calendar show the age of your father?
> 
> I put %%(diary-chinese-anniversary 12 1 1952) in my diary file and on
> 2008.12.27 (solar calendar), it says '56 years old', isn't this correct?
> 

Saturday   27 December 2008
   Birthday:   Dad is 56 years old.

Friday     15 January 2010
   Birthday:   Dad is 58 years old.

There is no '57 years old'.


> There are different ways of counting ages. The diff var in the
> diary-chinese-anniversary holds the age value.
> 
> Incidentally I found a bug in diary-chinese-anniversary. Could you test
> the attached version?
> 

The new version cause .org very slow and shows "Bad sexp at line 36 in ...". What
do you want to test?


Best wishes,
Wei-Wei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-05-06  5:27           ` Wei-Wei Guo
@ 2009-05-06  9:38             ` Leo
  2009-05-06 10:40               ` Wei-Wei Guo
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2009-05-06  9:38 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-05-06 06:27 +0100, Wei-Wei Guo wrote:
[...]
>> How do you make calendar show the age of your father?
>>
>> I put %%(diary-chinese-anniversary 12 1 1952) in my diary file and on
>> 2008.12.27 (solar calendar), it says '56 years old', isn't this correct?
>>
>
> Saturday   27 December 2008
>   Birthday:   Dad is 56 years old.
>
> Friday     15 January 2010
>   Birthday:   Dad is 58 years old.
>
> There is no '57 years old'.

That's the bug I spotted. Should be fixed now.


>> There are different ways of counting ages. The diff var in the
>> diary-chinese-anniversary holds the age value.
>>
>> Incidentally I found a bug in diary-chinese-anniversary. Could you test
>> the attached version?
>>
>
> The new version cause .org very slow and shows "Bad sexp at line 36 in ...". What
> do you want to test?

Sorry there was a typo. Fixed in http://paste.lisp.org/display/79755.

>
>
> Best wishes,
> Wei-Wei


-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: How to set a entry with Chinese calender?
  2009-05-06  9:38             ` Leo
@ 2009-05-06 10:40               ` Wei-Wei Guo
  2009-05-06 13:51                 ` Leo
  0 siblings, 1 reply; 12+ messages in thread
From: Wei-Wei Guo @ 2009-05-06 10:40 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode

Leo 写道:

Hi Leo,


>>> There are different ways of counting ages. The diff var in the
>>> diary-chinese-anniversary holds the age value.
>>>
>>> Incidentally I found a bug in diary-chinese-anniversary. Could you test
>>> the attached version?
>>>
>> The new version cause .org very slow and shows "Bad sexp at line 36 in ...". What
>> do you want to test?
> 
> Sorry there was a typo. Fixed in http://paste.lisp.org/display/79755.
> 

The age is calculated right now and the package works fine now. Thanks a lot!


Best wishes,
Wei-Wei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to set a entry with Chinese calender?
  2009-05-06 10:40               ` Wei-Wei Guo
@ 2009-05-06 13:51                 ` Leo
  0 siblings, 0 replies; 12+ messages in thread
From: Leo @ 2009-05-06 13:51 UTC (permalink / raw)
  To: emacs-orgmode

On 2009-05-06 11:40 +0100, Wei-Wei Guo wrote:
> The age is calculated right now and the package works fine now. Thanks
> a lot!

Nice. I posted it to emacs-sources.
See http://permalink.gmane.org/gmane.emacs.sources/3252

-- 
.: Leo :. [ sdl.web AT gmail.com ] .: I use Emacs :.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-05-06 13:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30  7:54 How to set a entry with Chinese calender? Wei-Wei Guo
2009-05-04 14:33 ` Carsten Dominik
2009-05-04 15:07 ` Leo
2009-05-05 13:53   ` Wei-Wei Guo
2009-05-05 15:00     ` Leo
2009-05-05 23:32       ` Wei-Wei Guo
2009-05-06  1:57         ` Leo
2009-05-06  2:05           ` Leo
2009-05-06  5:27           ` Wei-Wei Guo
2009-05-06  9:38             ` Leo
2009-05-06 10:40               ` Wei-Wei Guo
2009-05-06 13:51                 ` Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).