Subject | Re: Usage of TIB_Date: FIX |
---|---|
Author | Marco Menardi |
Post date | 2003-10-16T17:25:20Z |
Sorry, but seems that the "reply" button of the group is not working
today (or is it with Mozilla 1.5?), so I write a brand new message
with the answer. If someone has the same problem (you press "Send" and
nothing changes in the list, nor you change page) let me know.
Here the "real message" with the answer:
--------
--- In IBObjects@yahoogroups.com, "Riho-Rene Ellermaa"
<r.ellermaa@h...> wrote:
File: IBC_Date.IMP
change the UpdateMask procedure with the following code:
procedure TIB_CustomDate.UpdateMask( UnboundMask: string );
begin
if UnboundMask = '' then
begin
if copy(AnsiLowerCase(ShortDateFormat), 1, 1) = 'y' then // year
first, like in Lithuanian and Latvian countries
UnboundMask := '!9999' + DateSeparator + '99' + DateSeparator +
'99;1; '
else
UnboundMask := '!99' + DateSeparator + '99' + DateSeparator +
'9999;1; ';
end;
inherited UpdateMask( UnboundMask );
end;
That, in my tests, seems to work, and, contrary to what I supposed,
Autofil property works as well.
To Jason: since I don't have access to your code, could you please
merge this improvement in the forecoming subrelease?
In IBC_Date.int credits section there is to add:
{ Marco Menardi <mmenaz@...>
}
{ 16-Oct-2003
}
{ Added support while unbound for date format like yyyy/mm/dd
(year first) }
{ used in countries like Lithuanian and Latvian
}
{
}
Thanks
Marco Menardi
today (or is it with Mozilla 1.5?), so I write a brand new message
with the answer. If someone has the same problem (you press "Send" and
nothing changes in the list, nor you change page) let me know.
Here the "real message" with the answer:
--------
--- In IBObjects@yahoogroups.com, "Riho-Rene Ellermaa"
<r.ellermaa@h...> wrote:
> I'm from Estonia and my application needs to work also in Latvia andLithuania.
> Our date format is DD.MM.YYYY, but lithuanians use YYYY.MM.DD andlatvians YYYY/MM/DD
>Ok, here the fix:
>
> Riho-Rene Ellermaa
> senior programmer
File: IBC_Date.IMP
change the UpdateMask procedure with the following code:
procedure TIB_CustomDate.UpdateMask( UnboundMask: string );
begin
if UnboundMask = '' then
begin
if copy(AnsiLowerCase(ShortDateFormat), 1, 1) = 'y' then // year
first, like in Lithuanian and Latvian countries
UnboundMask := '!9999' + DateSeparator + '99' + DateSeparator +
'99;1; '
else
UnboundMask := '!99' + DateSeparator + '99' + DateSeparator +
'9999;1; ';
end;
inherited UpdateMask( UnboundMask );
end;
That, in my tests, seems to work, and, contrary to what I supposed,
Autofil property works as well.
To Jason: since I don't have access to your code, could you please
merge this improvement in the forecoming subrelease?
In IBC_Date.int credits section there is to add:
{ Marco Menardi <mmenaz@...>
}
{ 16-Oct-2003
}
{ Added support while unbound for date format like yyyy/mm/dd
(year first) }
{ used in countries like Lithuanian and Latvian
}
{
}
Thanks
Marco Menardi