This Help forum is for issues relates to the latest release (1.7.10/11/12). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: [SOLVED] before present

before present 5 months 1 week ago #1

  • mitaine
  • mitaine's Avatar
  • Offline
  • New
  • Posts: 8
Bonjour,

je teste webtrees pour migrer ma généalogie établie sous Heredis 2019.

J'ai des individus historiques dont certains sont nés avant jésus-christ.

les dates négatives sont transformées en dates positives.
Mon site Webtrees 1.7.13 : 1tgral.com/Mitaine/index.php?ctype=gedcom&ged=mitaine
PHP 7.3.3
The administrator has disabled public write access.

before present 5 months 1 week ago #2

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
webtrees uses the GEDCOM format for dates.

For dates before christ, use "B.C.". after the year. e.g.

"10 AUG 123 B.C."
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

before present 5 months 1 week ago #3

  • mitaine
  • mitaine's Avatar
  • Offline
  • New
  • Posts: 8
Thank you,

HEREDIS creates dates BC as negative dates in Gedcom, for example : 2 DATE ABT @#DJULIAN@ -3080

I have thousands of dates, how can I do to change them in a correct format ?
Mon site Webtrees 1.7.13 : 1tgral.com/Mitaine/index.php?ctype=gedcom&ged=mitaine
PHP 7.3.3
The administrator has disabled public write access.

before present 5 months 1 week ago #4

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Gold
  • Greetings from Utrecht, Holland
  • Posts: 1602
Search & Replace with "regular expressions" can do the trick, but can be difficult to get right.
stamboom.BertKoor.nl runs on webtrees v1.7.9
The administrator has disabled public write access.

before present 5 months 1 week ago #5

  • mitaine
  • mitaine's Avatar
  • Offline
  • New
  • Posts: 8
Thank You,
but I don't think that it is the right way,
I have thousands of dates between -1 and -4000 ...
Mon site Webtrees 1.7.13 : 1tgral.com/Mitaine/index.php?ctype=gedcom&ged=mitaine
PHP 7.3.3
The administrator has disabled public write access.

before present 5 months 1 week ago #6

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Gold
  • Greetings from Utrecht, Holland
  • Posts: 1602
"Control Panel" / "Modules" / "Batch update" with a regular expression replacing:
2 DATE (.*)-(.*)
With
2 DATE $1$2 B.C.

You don't need to search/replace all possible dates. Matching patterns with groups (brackets in the first expression are dollar-num in the second) will here take out the minus and put B.C at the end.

If "@#DJULIAN@" also needs to be deleted:

2 DATE (*.)@#DJULIAN@(.*)-(.*)
With
2 DATE $1$2$3 B.C.

I cannot guarantee it works, you can try though... Sometimes special chars need to be "escaped" with a backslash. It is a fresh import, so nothing to loose.
stamboom.BertKoor.nl runs on webtrees v1.7.9
Last Edit: 5 months 1 week ago by bertkoor.
The administrator has disabled public write access.

before present 5 months 1 week ago #7

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
I don't think you can fix this in webtrees...

You cannot import negative years. The minus sign is not imported.

You will need to fix the GEDCOM file before you import it into webtrees.

It can be fixed in seconds if you have an "advanced" text editor.

For example, in vi/vim/gvim you would use this command
:s/\(@#DJULIAN@.*\) -\([0-9]*\)/\1 \2 B.C./
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

before present 5 months 1 week ago #8

  • mitaine
  • mitaine's Avatar
  • Offline
  • New
  • Posts: 8
Thank you for help

I'll search a good text editor to do that.

I think it should be good to write help in wiki about "regular expression" in batch update.
I did not find anything about it
Mon site Webtrees 1.7.13 : 1tgral.com/Mitaine/index.php?ctype=gedcom&ged=mitaine
PHP 7.3.3
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

[SOLVED] before present 5 months 1 week ago #9

  • mitaine
  • mitaine's Avatar
  • Offline
  • New
  • Posts: 8
Problem solved.
Mon site Webtrees 1.7.13 : 1tgral.com/Mitaine/index.php?ctype=gedcom&ged=mitaine
PHP 7.3.3
The administrator has disabled public write access.
Powered by Kunena Forum