RefreshCapcha

Author Topic: Version 2 Date Standardization  (Read 8160 times)

Offline CuF

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +40/-0
    • View Profile
Version 2 Date Standardization
« on: January 11, 2013, 03:20:50 am »
It'll mean more work for script writers, but I was wondering if there will be an effort to standardize the date format returned.

I've started using it, and seen all sorts of formats used on the different sites.  Dashes, slashes, different order, age in days only, etc.
Should we be making the effort to format dates YEAR-MONTH-DAY?

Pirate Bay is all over the place.  They use Today Time, Y-day Time, Month-Day Time or Month-Day Year, depending on the age.  Sorting by date actually puts them out of order.

It'd be a bear to have one format for all sites, but would make sorting better for users.

Offline chip!

  • Bad Ass
  • Administrator
  • Unstoppable
  • *****
  • Posts: 2301
  • Karma: +629/-6
    • View Profile
Re: Version 2 Date Standardization
« Reply #1 on: January 12, 2013, 05:25:49 am »
I started trying to create a standardization but it was too obnoxious with all the different styles and date/time representations, European/American formats that i just found it OK to leave it as the sites report and do without sorting for that column. I may revisit this in the future but its honestly a low priority for me.
  -  https://convivea.com  -   And...  boom goes the dynamite.

Offline CuF

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +40/-0
    • View Profile
Re: Version 2 Date Standardization
« Reply #2 on: January 12, 2013, 05:58:38 am »
I'd think the only way to make it work is to add $month, $day and $year.
Then whoever writes the script can make the results fit.

Although anything xx days ago would need some math thrown in to the script to calculate from the current date... okay maybe not.  Now my head hurts.

Offline Bovski

  • Head Cider Tester
  • Hero Member
  • *****
  • Posts: 673
  • Karma: +189/-0
  • High Five Me
    • View Profile
    • Warez The Index
Re: Version 2 Date Standardization
« Reply #3 on: February 04, 2013, 07:56:30 am »
VB6's date handling is quite good I don't think it would be a mammoth task apart from the Unicode sites where text months could get interesting unless you built them into the translations and had a reference in the script to the language of the site.

Just adding a couple of variables
@Year
@Now

and Exposing some of VB's Functions
DateSerial(year, month, day)
DateAdd(interval, number, date)

though the latter would probably be better if date add became DateSub
Code: [Select]
function DateSub(interval,number,date) as date
DateSub=DateAdd(interval,0-number,date)
end Function

And Just to keep the scripts tidy and readable a niice $date=code(var,D) [codeD][/codeD]

Just some thoughts on this for Bit Che V3.0 ;D