Qcubed 2.xx How do you extend the year range in the Qdatepicker dropdown - qcubed

We are working with a CMS system built with qCubed 2.xx The Year range in the QDatepicker dropdown ended at year 2020. I cannot seem to find where to set or extend the date year range. Is there nyone out there who can help?
Thanks
David

Glad to see someone else still using qcubed 2.xx :-)
Try to check this file:
includes/qcubed/_core/base_controls/QDateTimePicker.class.php
Look for these lines:
protected $intMinimumYear =
protected $intMaximumYear =

Related

Exclude date via .exclude

I have been looking everywhere for documentation on excluding time and before and after. Ie My app for school is for appointments. They want me to make sure no one can sign up earlier than the current day. If someone could give me a format I have it so i can strip it down to just the day. But not only an solution to the problem but a link to some great detailed documentation as I need date and time for a lot on this project would be good.
'other' : Item.objects.exclude(time |date:"M d, Y"),
that is the current code it does not work. I get invalid syntax. If I take out the () of it my page loads so the () is the issue. Any help would be greatly appropriated.
Maybe try filtering a date range instead of excluding before and after
Item.objects.filter(date__range=["2017-01-01", "2017-01-31"])
To exclude before and after something like this should work with __lt for less than and __gt for greater than:
Item.objects.exclude(date__lt=datetime.date(2017, 1, 1)).exclude(date__gt=datetime.date(2017, 1, 31))

How can I get the current day in Robot Framework?

Im new to automated Testing.
Now I want to select the current weekday from a list.
I want to us following Keyword:
Selenium2Library.Select From List by Value ${day_of_the_week}
How can I get the Current day in Robot Framework? Is there a simple solution to my Problem?
The best would be a variable that gives me the current day in german Language.
I hope you can help me.
Using the Library DateTime
Which can be called by:
**** Settings ***
Library DateTime
You can use the Get Current Date keyword and assign it to a Var and specify the format. For example:
${CurrentDate} Get Current Date result_format=%d-%m-%Y
Log ${CurrentDate}
In your case you need to change the Result_format to retrieve the current day. This would be
${CurrentDay} Get Current Date result_format=%A
Log ${CurrentDay}
Which, when viewed in the log, would retrieve "Thursday"
The list of formats can be found here
Hope this helps you!
EDIT:
Due to the DateTime Library not supporting local names for the dates (Montag for Monday in German for instance) The Asker switched to the %w format to return 0-6 range. Then used an index to change the int into a string of the date!

C++ and Windows: Is SYSTEMTIME always based on the Gregorian calendar?

I have a SYSTEMTIME struct. This struct may either contain a UTC time or a local time that was returned from a Windows API function at some prior point and time.
In C++ I am calculating the day of the year based on the SYSTEMTIME that a function returns. In other words how many days since Jan 1. In order to do that I need to be mindful of the extra day during leap years, Feburary 29. That's all easy enough if I knew that the SYSTEMTIME is always based on the gregorian calendar.
If a user in a foreign country uses some other calendar system wouldn't I have a problem calculating the day of the year? I can't seem to do this on my machine to test the theory, and I don't even know if it's plausible. Any Microsoft experts that can help me out here?
Maybe a better question would be is there already a Windows API function that calculates the day of the year based on a SYSTEMTIME? I can't find one.
The closest thing I could find searching is this javascript question, which is interesting but I think very different from what I'm asking. I won't see any replies to this question until tomorrow (Monday) so if there are any follow up questions I will answer them then.
Thanks!
edit: I found this article but it still doesn't answer the question:
OS level support for non-Gregorian calendars? - Sorting it all Out - Site Home - MSDN Blogs
In looking at SYSTEMTIME on MSDN, it says:
Retrieves the current system date and time. The system time is expressed in Coordinated Universal Time (UTC).
It seems that regardless, SYSTEMTIME works in the Gregorian calendar.
Best of luck, I hope that I was of help.

How to get current year in dotCMS?

How to get current year in dotCMS? I need to display it in footer copyright. I am try this $date.format('YYYY', $UtilMethods.getCurrentDate()) but not working.
$dateString = $date.format('yyyy',$UtilMethods.getCurrentDate())
Not sure entirely, looks right, maybe try lower case 'yyyy' is the only difference I found in research.
This will give the result 2012: $date.format('yyyy',$UtilMethods.getCurrentDate())
Here you can find alot more about dotCMS and Velocity http://dotcms.org/documentation/VelocityAndDotCMS

XSLT order in months AND years

I have a problem. I have an XML tree which looks similar to this:
<wd:meta>
<wd:creation time="[TIMESTAMP]" />
<wd:title><![CDATA[Nice title]]></wd:title>
</wd:meta>
And there are many more siblings with the same Structure.
This tree goes into the XSLTProcessor and gets a nice Stylesheet.
Now i want to take this apart into months (In my Stylesheet). So that there is something like that:
Everything that happed in August
Nice title 1
Nice title 2
Everything that happend in September
Nice title 3
Nice title 4
How can i do something like this? I made a little bit of research but i wasn't very successful.
The only thing i found what would be maybe useful was that: following-sibling
Can anyone help me? I really appreciate your help.
Thanks.
edit://
I now used the Muenchian method adopted from http://www.jenitennison.com/xslt/grouping/muenchian.html but i only can order it by month, NOT by year. I tried the Answer of the possible duplicate and tried to understand it, but it's not that easy. Has anyone a easier solution?
In a first step i would iterate your content and generate a monthname for your timestamps. Then you can sort it by the month name. If you have xslt 2.0 you can use group-by to group them by month. If not, you can acturlly iterate your content and check if there is a following-sibling with the current month name. If so, go on with the same month name as the month of the current element. If not, start a new month.