projects
/
infodrom.org
/
service.infodrom.org
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
665b7ce
)
Finally added support for half typed date strings which really should
author
Joey Schulze
<joey@infodrom.org>
Wed, 16 Oct 2002 17:55:27 +0000
(17:55 +0000)
committer
Joey Schulze
<joey@infodrom.org>
Wed, 16 Oct 2002 17:55:27 +0000
(17:55 +0000)
be sufficient.
src/InfoCon/buch/infocon
patch
|
blob
|
history
diff --git
a/src/InfoCon/buch/infocon
b/src/InfoCon/buch/infocon
index
c634977
..
da37618
100755
(executable)
--- a/
src/InfoCon/buch/infocon
+++ b/
src/InfoCon/buch/infocon
@@
-219,6
+219,8
@@
sub buchung_input
my $weiter = 'y';
my $i;
my $query;
my $weiter = 'y';
my $i;
my $query;
+ my ($date_sec,$date_min,$date_hour,$date_mday,$date_mon,$date_year,$date_wday,$date_isdst)
+ = localtime();
print "Buchungseingabe\n\n";
while ($weiter =~ /[JjYy]/) {
print "Buchungseingabe\n\n";
while ($weiter =~ /[JjYy]/) {
@@
-227,6
+229,19
@@
sub buchung_input
if ($fieldname[$i] eq "Category" && $ans eq "?") {
@categories = &get_categories() if ($#categories);
printf " %s\n", join (", ",@categories);
if ($fieldname[$i] eq "Category" && $ans eq "?") {
@categories = &get_categories() if ($#categories);
printf " %s\n", join (", ",@categories);
+ } elsif ($fieldname[$i] eq "Datum") {
+ if ($ans =~ /^\d+\.\d+.\d+$/) {
+ $input[$i] = $ans;
+ $i++;
+ } elsif ($ans =~ /^\d+\.\d+.$/) {
+ $ans .= $date_year + 1900;
+ $input[$i] = $ans;
+ $i++;
+ } elsif ($ans =~ /^\d+\.$/) {
+ $ans .= sprintf ("%d.%d", $date_mon + 1, $date_year + 1900);
+ $input[$i] = $ans;
+ $i++;
+ }
} else {
$input[$i] = $ans;
$i++;
} else {
$input[$i] = $ans;
$i++;