• Home
  • Blog
  • Add-ons
  • Forum
  • Wiki
  • Developers
Nightingale - The tune of life, the tune of yours
  • Portal
  • Search
  • Member List
  • Calendar
  • Help
  • Portal
  • Search
  • Member List
  • Calendar
  • Help
Guest Hi, Guest
  • Login
  • Register
Login
Username:
Password: Lost Password?
 
Nightingale Forums Nightingale Helpdesk Smart playlist using Last Played date

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Smart playlist using Last Played date
pandpp Offline
Junior Member
**
Posts: 2
Threads: 1
Joined: May 2015
Reputation: 0
#1
05-18-2015, 02:28 PM
I recently migrated from Songbird to Nightingale.

I wanted to make a smart playlist, which was fairly simplistic, but the date value keeps changing on me, every time I change focus off the field.

I do live in Australia, where the date format is reversed of the US, so, that may be causing it...

To reproduce:
File > New Smart Playlist
Change Artist to Last Played.
The criteria defaults to "is", and today's date, which for me is 18/05/2015
Click the + to add more conditions.
Click back in the date field, of the first condition
Click back in the new empty field, of the second condition
The date value is changed from 18/05/2015 to 5/06/2016
Click back in the date field, of the first condition
Click back in the new empty field, of the second condition
The date value is changed from 5/06/2016 to 6/05/2016
Click back in the date field, of the first condition
Click back in the new empty field, of the second condition
The date value is changed from 6/05/2016 to 5/06/2016

Repeat infinitely.

Can anyone else reproduce this?
Find
Reply
rsjtdrjgfuzkfg Offline
Developer
*******
Posts: 664
Threads: 15
Joined: Oct 2011
Reputation: 15
#2
05-21-2015, 05:13 AM (This post was last modified: 05-21-2015, 05:53 AM by rsjtdrjgfuzkfg.)
(05-18-2015, 02:28 PM)pandpp Wrote: Can anyone else reproduce this?

Yes and no... I can reproduce the initial change, but not the changes afterwards. In Germany, we use "day.month.year", and Nightingale accepts input in both the local (Geman) and US-format ("month/day/year").

Entering the String "18/05/2015" causes it to be switched to "05.06.2016" (which indeed sounds stupid, but somewhat correct as the 18. month is the 6. month in the next year). The string is thus treated as (slightly malformed^^) US-format.

I'd assume that the UI code first checks for US-formatted dates (the check succeeds), then converts the time to your local format (switching month and day). Validation is likely triggered on each focus change away from the edit form.


Man, why are there so many date formats around...

Edit: if someone wants to have a look at the technical side of this, sbDatetimePropertyInfo holds default output formatting (which seems to work for me; called from here), but the inverse operation is not handled in the property but using Date.parse, which seems to have the issues we see here.

@pandpp: Please open the error console (Tools|Error console...) and enter the following code in the "Code:" field
Code:
new Date(Date.parse("18/05/2015"))
A result should pop up at the end of the console; for example "Sun Jun 05 2016 00:00:00 GMT+0200 (CET)" (German Nightingale in GMT+2). What do you get?
Songbird/Nightingale Community Developer and German Translator
Find
Reply
pandpp Offline
Junior Member
**
Posts: 2
Threads: 1
Joined: May 2015
Reputation: 0
#3
05-21-2015, 06:38 AM
(05-21-2015, 05:13 AM)rsjtdrjgfuzkfg Wrote: @pandpp: Please open the error console (Tools|Error console...) and enter the following code in the "Code:" field



Code:
new Date(Date.parse("18/05/2015"))
A result should pop up at the end of the console; for example "Sun Jun 05 2016 00:00:00 GMT+0200 (CET)" (German Nightingale in GMT+2). What do you get?

When I evaluate:
Code:
new Date(Date.parse("18/05/2015"))

in the error console, the result I get is:
Sun Jun 05 2016 00:00:00 GMT+1000 (AEST)

Taking that one step further, when I evaluate:
Code:
new Date(Date.parse("05/06/2016"))

in the error console, the result I get is:
Fri May 06 2016 00:00:00 GMT+1000 (AEST)

And of course, if I evaluate:
Code:
new Date(Date.parse("06/05/2016"))

in the error console, the result I get is:
Fri Jun 05 2016 00:00:00 GMT+1000 (AEST)

This is what gives me the infinitely repeatable step.
Find
Reply
rsjtdrjgfuzkfg Offline
Developer
*******
Posts: 664
Threads: 15
Joined: Oct 2011
Reputation: 15
#4
05-22-2015, 09:22 AM
Thanks for reproducing the issue!

Issue #350 opened.
Songbird/Nightingale Community Developer and German Translator
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)
  • Return to Top
  • Lite (Archive) Mode
  • RSS Syndication
Current time: 03-30-2023, 08:28 AM Powered By MyBB, © 2002-2023 MyBB Group.
Design By AliReza_Tofighi In WhiteCrow Software Group.
white outlined nightingale project logo

Nightingale is free!
It is an Open Source project released under the terms of the GNU General Public License v2 (GPL v2).
For more details, please read the license information.

Follow us!
f  g  t

Support
  • Community Forum
  • Official Blog
  • Add-ons
  • Wiki
  • Help Forum
Contribute
  • Developer's Center
  • Translate Nightingale
  • Source Code
  • Report a Bug
Ressources
  • Download Nightingale
Linear Mode
Threaded Mode