Jump to content

AutoUpdateIt


layer
 Share

Recommended Posts

this is more a nit pick than anything, but i just wanted to point out that AutoUpdateIt says under latest BETA (its 12/12/05 right now) "December 12nd" .. i dont know what other numbers it does this sort of thing for, because i've only noticed it now.

FootbaG
Link to comment
Share on other sites

The numbers 11 to 13 are special cases so it would probably say 11st and 13rd as well, given the chance. I imagine that it wouldn't be hard to fix.

Edit: Why not just simplify the logic and remove ordinals altogether? December 12 is just as good.

Edited by LxP
Link to comment
Share on other sites

While we are on nit picks. I would like to state one. I go to run the program. It doesnt tell me which version of the beta I have installed. I think that would be a nice addition.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Why not just simplify the logic and remove ordinals altogether? December 12 is just as good.

Agreed.

But here's a simple fix for numbers on the range 1 to 31.

Func _NumSuffix($i_Num)
    $i_Num = "," & $i_Num & ","
    If StringInStr(",1,21,31,", $i_Num) Then Return "st"
    If StringInStr(",2,22,", $i_Num) Then Return "nd"
    If StringInStr(",3,23,", $i_Num) Then Return "rd"
    Return "th"
    Return $i_Num
EndFunc

Or a general recursive function that should work for non-negative integers.

Func _NumSuffix($i_Num)
    $i_Num = StringRight($i_Num, 2);make sure numbers over 100 work right
; Base Cases
    If $i_Num = 0 Then Return "th"
    If $i_Num = 1 Then Return "st"
    If $i_Num = 2 Then Return "nd"
    If $i_Num = 3 Then Return "rd"
    If 4 <= $i_Num And $i_Num <= 20 Then Return "th"
; Recursive case
    Return _NumSuffix(Mod($i_Num,10))
EndFunc
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Somebody should go ahead and write (and submit) these improvements, cus I'm sure not updating the darn thing anymore. :P

The whole system that's been setup with the beta is too complex for me. Running the stable, next to the beta, in different folders, etc., I don't bother. When a new beta comes out, I download, overwrite my existing install, and away I go. I can't remember the last time I ran the stable release.

Edited by Saunders
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...