Handsontable datepicker week number modification - datepicker

Hello i am using the Handsontable library and i have a problem.
I cant find anyway to configure the date Picker to start counting after the first Thursday of the year.
As a result i get a week more than i should.
I get week 27 instead of week 26 for 29-06-2016.
Anyone has a suggestion?

You will use the ISO 8601 format. In Pickaday you have to set the option "showWeekNumber" to "true". The default is "false"

Related

How to set default parameter as 7 days ago to different date format on ssrs

I have default parameter and this parameter shows me 7 days ago with the expression below:
=DateAdd("d",-7,CDate(Format(Today(), "MM/dd/yyyy")))
But my report just running without error while the customer using "MM/dd/yyyy" time format.
Is there a way to use this parameter ALSO with "dd/MM/yyyy" format?
I would like to set a parameter to show 7 days ago but ı would like to use this parameter with both time format.
Thanks
Don't use the Format. Just put =DateAdd("d",-7,Today()). It will automatically take the Format according to System's format.
Firstly, the format part of your expression is redundant and misleading - don't use it
=DateAdd("d",-7,Today())
Secondly, you don't have any choice of how SSRS displays it's datepickers. It shows american format only (M/d/Y)
A date is a value and values do not have a format. A date is displayed and has to be entered in a format that depends on the language settings of your browser. Using a date picker, you even don't have to care about the input format. So, just use an expression that calculates the desired value:
=Today.AddDays(-7)

12h cycle AM/PM in Fluid

In TYPO3 I am using the News Extension to create an Event. In my List view I am using the following code snippet to show the End Time of the Event.
<f:format.date format=" - %H:%M Uhr">{newsItem.eventEnd}</f:format.date>
Which results in " - 20:00 Uhr" (German Language, hence the "Uhr").
I want a Format that switches that time to " - 08:00 PM" for the English translation, I am assuming that is not possible in Fluid since my searches have no result. Is there any workaround?
You can put your format into a locallang file. There it's possible to change the format related to the language.
<f:format.date format="{f:translate(key:'dateFormat')}">{newsItem.eventEnd}</f:format.date>
The date format viewhelper uses the same format as the default PHP date and strftime functions, so anything you can use %I:%M %p to get 08:00 PM. See http://php.net/manual/en/function.date.php and http://php.net/strftime for more about this.

adding todays date mid sentence and return mm/dd/yyyy (manually not vba)

Not sure if I can post this here as it is not through a vba macro. I been searching but can't seem to find a solution on here or google. I have a sentence in lets say A1 that I want to say:
*Productivity is based on past 4 weeks to today (7/27/2015 - 8/26/2015)
What I want to do is make it so I never have to change today's date "8/26/2015". I tried to to use & and looks like this
="*Productivity is based on past 4 weeks to today (7/27/2015 - " & TODAY() & ")"
problem is it returns as *Productivity is based on past 4 weeks to today (7/27/2015 - 42242)
How can I make 42242 return as a short date mm/dd/yyyy?
And is it even possible to make to make a formula for 7/27/2015 to go back 4 weeks to the monday of that week?
Try the TEXT function:
="*Productivity is based on past 4 weeks to today (7/27/2015 - " & TEXT(TODAY(),"mm/dd/yyyy") & ")"
To go back four weeks (28 days) from today (alas, does not guarantee a particular day of week):
="Four weeks ago is " & TEXT(DATE(YEAR(TODAY()), MONTH(TODAY()),DAY(TODAY())-28),"mm/dd/yyyy")
Have not tested this extensively, but I believe this will get you back to the Monday of the week four weeks previous:
="Monday of week four weeks previous: " & TEXT(DATE(Year(today()),month(today()),day(today())-28-mod(today(),7)+2),"mm/dd/yyyy")
The trick above is to use the MOD function to get an index into the current day of week, then offset that back to Monday...

Get last day of the next three months with Crystal Report

I am heading to find out a formula for a date that is the last day of the next 3 months with Crystal Report. I've tried with the code as below but it shows a message when it is out of an array of month (1-12). Please give me any advice to address this problem.
ToText(date(year({rptIEXSaleInvoiceSummary.ETD}),month({rptIEXSaleInvoiceSummary.ETD})+4,1)-1, "dd-MMM-yyyy")
It works fine if the ETD's month is less than 8. However, it might cause problem when it is more than 9, 10 as an image below.
I've found the solution. Please let me know if you have any idea to solve the problem.
IF (month({rptIEXSaleInvoiceSummary.ETD})+4) > 12 THEN
ToText(date(year({rptIEXSaleInvoiceSummary.ETD})+1,month({rptIEXSaleInvoiceSummary.ETD})-8,1)-1, "dd-MMM-yyyy")
ELSE
ToText(date(year({rptIEXSaleInvoiceSummary.ETD}),month({rptIEXSaleInvoiceSummary.ETD})+4,1)-1, "dd-MMM-yyyy")
To get the 4th month use DateAdd
DateAdd(“m”,4,{rptIEXSaleInvoiceSummary.ETD})
Then you can compose the date
ToText(date(year(DateAdd(“m”,4,{rptIEXSaleInvoiceSummary.ETD})),month({rptIEXSaleInvoiceSummary.ETD}),1), "dd-MMM-yyyy")
or subtract days
DateAdd(“d”,day({rptIEXSaleInvoiceSummary.ETD}), DateAdd(“m”,4,{rptIEXSaleInvoiceSummary.ETD}))

Bug in Zend_Date (back in time)

I have a very strange problem, Zend_Date is converting my timestamp to a year earlier.
In my action:
// Timestamp
$intTime = 1293922800;
// Zend_Date object
$objZendDate = new Zend_Date($intTime);
// Get date
echo date('Y-m-d',$intTime).'<br>';
echo $objZendDate->get('YYYY-MM-dd');
This outputs:
2011-01-02
2010-01-02
Can anyone tell me what i'm doing wrong?
From the ZF issue tracker it seems this is a known issue:
Recently a lot of ZF users are filing a bug that Zend_Date returns the wrong year, 2009 instead of 2008. This is however expected behaviour, and NOT A BUG!
From the FAQ:
When using own formats in your code you could come to a situation where you get for example 29.12.2009, but you expected to get 29.12.2008.
There is one year difference: 2009 instead of 2008. You should use the lower cased year constant. See this example:
$date->toString('dd.MM.yyyy');
instead of
$date->toString('dd.MM.YYYY');
From the manual
Note that the default ISO format differs from PHP's format which can be irritating if you have not used in previous. Especially the format specifiers for Year and Minute are often not used in the intended way.
For year there are two specifiers available which are often mistaken. The Y specifier for the ISO year and the y specifier for the real year. The difference is small but significant. Y calculates the ISO year, which is often used for calendar formats. See for example the 31. December 2007. The real year is 2007, but it is the first day of the first week in the week 1 of the year 2008. So, if you are using 'dd.MM.yyyy' you will get '31.December.2007' but if you use 'dd.MM.YYYY' you will get '31.December.2008'. As you see this is no bug but a expected behaviour depending on the used specifiers.
For minute the difference is not so big. ISO uses the specifier m for the minute, unlike PHP which uses i. So if you are getting no minute in your format check if you have used the right specifier.
To add to zwip's answer, what happens behind the scenes is that your date format YYYY-MM-dd is actually translated into o\-m\-d, which is then passed to PHP's date() function internally with the timestamp you provided.
Like mentioned in the other answer, and in the documentation for the o format on the date format page, the calculation of the year based on the ISO week can sometimes result in the year being one different to the value that you expect.