September 28, 2021, 06:05:34

Author Topic: Why different results for julian formats entered  (Read 345 times)

Offline twgonder

  • Jr. Member
  • **
  • Posts: 29
Why different results for julian formats entered
« on: July 03, 2021, 16:39:45 »
I found a program in the documentation for julian.
Entering 03/07/21 and 03, 07, 21 return different results.
Is there a reason for this?

Offline jsalai

  • Jr. Member
  • **
  • Posts: 41
Re: Why different results for julian formats entered
« Reply #1 on: July 03, 2021, 21:16:23 »
I found a program in the documentation for julian.
Entering 03/07/21 and 03, 07, 21 return different results.
Is there a reason for this?

yes, there is!
https://smallbasic.github.io/reference/577.html

Returns the Julian date. (dates must be greater than 1/1/100 AD).

try this:
Code: [Select]
?julian("03/07/2021")
?julian(03,07,2021)
pause:end
I won't belong to any organization that would have me as a member.
[Groucho Marx]

Offline twgonder

  • Jr. Member
  • **
  • Posts: 29
Re: Why different results for julian formats entered
« Reply #2 on: July 06, 2021, 15:34:11 »
yes, there is!
https://smallbasic.github.io/reference/577.html

Returns the Julian date. (dates must be greater than 1/1/100 AD).

try this:
Code: [Select]
?julian("03/07/2021")
?julian(03,07,2021)
pause:end

I did see that in the manual, but I often do tests to see how correct the manual is. As you can see, using a 2 year number for  AD 21 should work the same as you're not going to enter 0021. In many cases as the leading zeros would be dropped in variables.
a = 0021: ? a (result is 21)

Despite what the manual says, the year 21 in one format seems to work, but I didn't check to see if it returned a correct answer.
« Last Edit: July 06, 2021, 15:36:50 by twgonder »

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal