Re: [Lazarus] Can't enter negative values in to TFloatSpinEdit

2013-11-12 Thread zeljko
On 11/12/2013 08:36 PM, Valdas Jankūnas wrote: Helo, situation: - os: Linux Kubuntu 13.10; - Lazarus: Lazarus 1.3 r43416M FPC 2.6.2 x86_64-linux-qt; - locale: LANG=lt_LT.UTF-8, LANGUAGE=lt, LC_*="lt_LT.UTF-8", LC_ALL= - Form's WS: qt; - on Form is placed TFloatSpinEdit (Max:100, Min:-100). Wh

Re: [Lazarus] DateDif function needed

2013-11-12 Thread waldo kitty
On 11/12/2013 3:40 PM, John Landmesser wrote: On 12.11.2013 21:01, waldo kitty wrote: [...] Which is correct? Date1 := 29.2.2000 Date2 := 28.02.2001 Your function: 0 Y, 11 M, 27 D Rxlib ( Jedi ) DateDiff: 0 Y, 11 M, 28 D Libre Office Calc: 0 Y, 11 M, 30 D The table - function of Libre Offi

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Bart
On 11/12/13, John Landmesser wrote: > On 12.11.2013 21:40, John Landmesser wrote: >> >> Which is correct? >> >> Date1 := 29.2.2000 >> Date2 := 28.02.2001 >> >> Your function: >> 0 Y, 11 M, 27 D >> >> Rxlib ( Jedi ) DateDiff: >> 0 Y, 11 M, 28 D [snip] > > RxLib is correct !!! > Fixed. (?) proced

Re: [Lazarus] Can't enter negative values in to TFloatSpinEdit

2013-11-12 Thread Bart
Possibly related to http://bugs.freepascal.org/view.php?id=23266 ? If not the same, please open a bugreport on the bugtracker. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/laz

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Bart
On 11/12/13, waldo kitty wrote: > you do not need any of the above if you change > >> Days := (DaysPerMonth(M1, IsLeapYear(Y2)) - D1) + D2 ; > > to > >Days := (DaysInAMonth(Y2,M1) - D1) + D2; > I did not know about DaysInAMonth. I just went coding and created that function because I

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Bart
On 11/12/13, John Landmesser wrote: > On 12.11.2013 21:40, John Landmesser wrote: >> >> Which is correct? >> >> Date1 := 29.2.2000 >> Date2 := 28.02.2001 >> I would actually say that in this particular case the diff is 1 Year... (11 M + (28 days in feb in a non-leapyear = 1M) = 12M = 1 Y. Bart

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Michael Van Canneyt
On Tue, 12 Nov 2013, John Landmesser wrote: Date1 := 29.2.2000 Date2 := 28.02.2001 Your function: 0 Y, 11 M, 27 D Rxlib ( Jedi ) DateDiff: 0 Y, 11 M, 28 D Libre Office Calc: 0 Y, 11 M, 30 D The table - function of Libre Office Calc is called in german DATUMDIF() Get a calendar and count?

Re: [Lazarus] DateDif function needed

2013-11-12 Thread John Landmesser
On 12.11.2013 21:40, John Landmesser wrote: Which is correct? Date1 := 29.2.2000 Date2 := 28.02.2001 Your function: 0 Y, 11 M, 27 D Rxlib ( Jedi ) DateDiff: 0 Y, 11 M, 28 D Libre Office Calc: 0 Y, 11 M, 30 D The table - function of Libre Office Calc is called in german DATUMDIF() Get a cal

Re: [Lazarus] DateDif function needed

2013-11-12 Thread John Landmesser
On 12.11.2013 21:01, waldo kitty wrote: type Date_Diff = record Years, Months, Days: Word; end; function CalendarDateDiff(Date1,Date2: TDateTime): Date_Diff; var theDiffRec: Date_Diff; Cmp: Integer; loDate,hiDate: TDateTime;

Re: [Lazarus] CopyFile in Windows

2013-11-12 Thread Richard Mace
Spot on. Can't believe I missed that. Thanks On 11 November 2013 20:48, Luca Olivetti wrote: > Al 11/11/13 18:14, En/na Jürgen Hestermann ha escrit: > > > > So either you remove the windows unit or, if not possible, > > you need to fully qualify from which unit you want to call CopyFile (I > >

Re: [Lazarus] DateDif function needed

2013-11-12 Thread waldo kitty
*FWIW* On 11/11/2013 5:11 PM, Bart wrote: type TDaysPerMonth = Array[1..12] of Word; function DaysPerMonth(AMonth: Word; IsLeapYear: Boolean): Word; const DaysPerMonthNormal: TDaysPerMonth = (31,28,31,30,31,30,31,31,30,31,30,31); DaysPerMonthLeap: TDaysPerMonth = (31,29,31,30,31,

Re: [Lazarus] Can't enter negative values in to TFloatSpinEdit

2013-11-12 Thread Avishai
I work with Windows so it may be different. I set TFloatSpinEdit.MinValue:= -100 and I can enter negative values. On Tue, Nov 12, 2013 at 9:36 PM, Valdas Jankūnas wrote: > Helo, > > situation: > - os: Linux Kubuntu 13.10; > - Lazarus: Lazarus 1.3 r43416M FPC 2.6.2 x86_64-linux-qt; > - locale: LA

Re: [Lazarus] DateDif function needed

2013-11-12 Thread waldo kitty
On 11/11/2013 6:54 PM, waldo kitty wrote: On 11/11/2013 10:46 AM, John Landmesser wrote: Fazit: You can't write a DateDif function with the functions in DateUtils.pas ?!! actually, you can but it is more brute-force for the results that you and i are looking for... brute-force as in actually

[Lazarus] Can't enter negative values in to TFloatSpinEdit

2013-11-12 Thread Valdas Jankūnas
Helo, situation: - os: Linux Kubuntu 13.10; - Lazarus: Lazarus 1.3 r43416M FPC 2.6.2 x86_64-linux-qt; - locale: LANG=lt_LT.UTF-8, LANGUAGE=lt, LC_*="lt_LT.UTF-8", LC_ALL= - Form's WS: qt; - on Form is placed TFloatSpinEdit (Max:100, Min:-100). When program is running I can't enter negative valu

Re: [Lazarus] CopyFile in Windows

2013-11-12 Thread Alejandro Gonzalo
Just put Windows last in the uses clause.   A..-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Local CHM help files or web based?

2013-11-12 Thread leledumbo
CHM for me, it has nice features that web based one can't do fast. -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Local-CHM-help-files-or-web-based-tp4034271p4034272.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- __

Re: [Lazarus] DateDif function needed

2013-11-12 Thread John Landmesser
On 12.11.2013 13:05, Bart wrote: I proposed a "solution" in this thread. It'll give you (at least that was the intention) the years, months, and days between two (Gregorian) dates. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

[Lazarus] Local CHM help files or web based?

2013-11-12 Thread Richard Mace
Hi all, I'm just about to start writing help files for my application but I can't work out whether to use web based ones or local c h m ones any ideas welcome? Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.

Re: [Lazarus] Lazarus with fpc 2.7.1

2013-11-12 Thread Reinier Olislagers
On 11/11/2013 14:26, Edson F. Lidorio wrote: > checkedin the repositoriesbelowandareoutdatedthe2.7 Those are (almost certainly) not svn repositories. Have a look at the documentation, e.g. http://freepascal.org/develop.var -- ___ Lazarus mailing list L

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Frederic Da Vitoria
2013/11/12 Michael Van Canneyt > > On Tue, 12 Nov 2013, Jürgen Hestermann wrote: > > Am 2013-11-11 17:25, schrieb Michael Van Canneyt: >> >>> The number of elapsed DAYS between these 2 dates is 60. >>> If the average number of days per month is assumed to be 30.4375, then 2 >>> >> full months wo

Re: [Lazarus] lhelp command line

2013-11-12 Thread Reinier Olislagers
On 10/11/2013 19:05, waldo kitty wrote: > > how does one get lhelp to load all or a certain set of chm files > from the command line? > If it doesn't work, it probably isn't implemented in lhelp command line handling. The lazarus chmhelp package that is used to control lhelp currently does load

Re: [Lazarus] DateDif function needed

2013-11-12 Thread Bart
On 11/12/13, Michael Van Canneyt wrote: > Feel free to provide other functions, I will happily accept them. I proposed a "solution" in this thread. It'll give you (at least that was the intention) the years, months, and days between two (Gregorian) dates. Bart -- __