After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 153738 - hebrew/gregorian date functions
hebrew/gregorian date functions
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.9.x
Other All
: High enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-09-25 17:10 UTC by Yaacov Zamir
Modified: 2009-10-21 00:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the plugin in a tar archive (30.00 KB, application/x-compressed-tar)
2004-09-25 17:12 UTC, Yaacov Zamir
Details
gDesklets pack_sensor modified to pack gnumeric python plugins (4.10 KB, text/plain)
2004-10-11 17:06 UTC, Yaacov Zamir
Details
a C version of the plugin (tar.gz) (11.80 KB, application/x-compressed-tar)
2005-01-14 19:53 UTC, Yaacov Zamir
Details

Description Yaacov Zamir 2004-09-25 17:10:34 UTC
I've made a python plugin, that adds new functions for converting from/to hebrew
and gregorian date systems, it may be of interst to others.
Comment 1 Yaacov Zamir 2004-09-25 17:12:21 UTC
Created attachment 31939 [details]
the plugin in a tar archive

to use it a added it to ./configure.in and plugins/Makefile.am
Comment 2 Jon Kåre Hellan 2004-10-05 19:43:04 UTC
Thanks. It "does something" for me. That's as far as I am able to test it.
It's probebly best to distribute this outside of gnumeric (but that's Jody's call). 

You may consider replacing Makefile.am with an old fashioned Makefile. You'll
lose internationalization, but get rid of the need autotools and intltools. User
will have to set prefix and version before installing. Here's what the Makefile
could look like:

# Simple makefile to install a Python plugin for Gnumeric.
# This is how you do it if you don't want autoconf & friends. Note:
# no i18n. mkinstalldirs comes with the source of a lot of Gnu programs.

prefix = /home/jk/gnome/test
version = 1.3.91
gnumeric_plugindir = ${prefix}/lib/gnumeric/${version}/plugins
installdir = ${gnumeric_plugindir}/py-hdate

INSTALL =  /usr/bin/install -c
MKINSTALLDIRS = ./mkinstalldirs

all:

install:
	$(MKINSTALLDIRS) $(installdir)
	${INSTALL} -m 644 py_hdate.py plugin.xml $(installdir)

.PHONY: all install

Comment 3 Yaacov Zamir 2004-10-06 13:15:51 UTC
Thank you, It is now in libhdate.sourceforge.net.

I used this Makefile to guess the install dir, will this script work on systems
other then my system, do I need to change it ?

# Simple makefile to install a Python plugin for Gnumeric.
# This is how you do it if you don't want autoconf & friends. Note:
# no i18n. mkinstalldirs comes with the source of a lot of Gnu programs.

prefix = /usr
version = 1.3.91
gnumeric_plugindir = ${prefix}/lib/gnumeric/${version}/plugins
installdir = ${gnumeric_plugindir}/py-hdate

#guess plugin dir
version_guess=`gnumeric --version | grep version | cut -f 2 -d \'`
gnumeric_plugindir_guess = ${prefix}/lib/gnumeric/${version_guess}/plugins
installdir_guess = ${gnumeric_plugindir_guess}/py-hdate
gnumeric_plugindir_locale_guess = ~/.gnumeric/${version_guess}/plugins
installdir_locale_guess = ${gnumeric_plugindir_locale_guess}/py-hdate

INSTALL =  /usr/bin/install -c
MKINSTALLDIRS = ./mkinstalldirs

all:
	
install:
	$(MKINSTALLDIRS) $(installdir)
	${INSTALL} -m 644 py_hdate.py plugin.xml $(installdir)

install_global:
	$(MKINSTALLDIRS) $(installdir_guess)
	${INSTALL} -m 644 py_hdate.py plugin.xml $(installdir_guess)

install_user:
	$(MKINSTALLDIRS) $(installdir_locale_guess)
	${INSTALL} -m 644 py_hdate.py plugin.xml $(installdir_locale_guess)

.PHONY: all install install_global install_user
Comment 4 Jon Kåre Hellan 2004-10-06 17:47:00 UTC
I set my prefix manually. Having done that, your guessing code almost worked 
in the shell, all I had to do was remove the spaces around '='.
The same code did not work in the makefile, though.
Comment 5 Yaacov Zamir 2004-10-11 17:06:02 UTC
Created attachment 32480 [details]
gDesklets pack_sensor modified to pack gnumeric python plugins

Hello, Thanks again.
I removed the guessing code from the make-file, and used Martin Grimme's
pack_sensor (gDesklets) to pack the gnumeric plugin,
(I did not ask Martin Grimme's permission, but I think it's ok).
This is a very awkward way to do 'cp -r' for two files (its ~200 lines), but
it's fun.
The pack_plugin script, attached, create an install file that can install to
any directory, or if none to the ~/.gnumeric/{ver}/plugins dir.
Comment 6 Jody Goldberg 2005-01-14 04:36:05 UTC
Let's get this into cvs after we branch
Comment 7 Yaacov Zamir 2005-01-14 19:53:04 UTC
Created attachment 36028 [details]
a C version of the plugin (tar.gz)

This is a c version of the plugin, i do not know what version is better.
I'm not happy about the names of the functions, can you think of more
descriptive ones.

(need to chang the configure.in and the /plugins/Makfile.am)
Comment 8 Jody Goldberg 2008-07-09 02:53:12 UTC
Good grief.  I completely forgot about this.   You have my sincere apologies.  I'll merge it for 1.9.2
Comment 9 Yaacov Zamir 2008-07-09 06:56:20 UTC
I forgot about this too. 

Are there similar functions in Excel/Calc, am I looking in the wrong place ?

http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_Date_%26_Time_functions

http://office.microsoft.com/en-us/excel/HP051996591033.aspx

If we can't copy existing function names, the function names and usage should be similar to existing date/time functions, current naming is looks out of place. Can someone think of better names ?

  
Comment 10 Morten Welinder 2009-10-20 23:42:55 UTC
Fixed.
Comment 11 Morten Welinder 2009-10-21 00:02:37 UTC
Btw., someone ought to verify that things still work.  That someone is
not me.