## Confusing Date Functions & Masks

Expand Messages
• The Help says: d displays the day as a number without a leading zero (1-31), and m the month as a number without a leading zero (1- 12). Accordingly...
Message 1 of 2 , Dec 6, 2008
The Help says: "d" displays the day as a number without a leading
zero (1-31), and "m" the month as a number without a leading zero (1-
12).

Accordingly...

^!Info ^\$GetDateFromInt(39610;m/d/yyyy)\$

will output "6/11/2008". That is, the "d" represents one-digit days
as well as two-digit days.

When turning the date into a date integer, the same mask doesn't
work...

^!Info ^\$GetDateToInt(6/11/2008;m/d/yyyy)\$

No output!

It works with...

^!Info ^\$GetDateToInt(6/11/2008;m/dd/yyyy)\$

That is, in this case, the mask has to accord exactly with the date
format. The "d" doesn't represent all days from 1 to 31 any more.
It's the same problem with "m" etc.

Isn't that incosistent?

I got to this problem when trying to check if the dates in a list are
within a certain range using...

^!IfInRange ^\$GetDateToInt(^\$GetLine\$;dd/mm/yyyy)\$ 29221..40543 etc..

If the dates have a mixed format like...

"12/06/2008", "12/6/2008", "1/10/2007", "2/2/2009" etc

I first have to adjust the given dates to a defined mask.

Flo

• ... That would seem inconsistent. Which brings up my next point, what do we do with bugs to get Eric s attention. As you know I have recently discovered two
Message 2 of 2 , Dec 6, 2008
Flo wrote:
> The Help says: "d" displays the day as a number without a leading
> zero (1-31), and "m" the month as a number without a leading zero (1-
> 12).
>
> Accordingly...
>
> ^!Info ^\$GetDateFromInt(39610;m/d/yyyy)\$
>
> will output "6/11/2008". That is, the "d" represents one-digit days
> as well as two-digit days.
>
> When turning the date into a date integer, the same mask doesn't
> work...
>
> ^!Info ^\$GetDateToInt(6/11/2008;m/d/yyyy)\$
>
> No output!
>
> It works with...
>
> ^!Info ^\$GetDateToInt(6/11/2008;m/dd/yyyy)\$
>
> That is, in this case, the mask has to accord exactly with the date
> format. The "d" doesn't represent all days from 1 to 31 any more.
> It's the same problem with "m" etc.
>
> Isn't that inconsistent?
>
> I got to this problem when trying to check if the dates in a list are
> within a certain range using...
>
> ^!IfInRange ^\$GetDateToInt(^\$GetLine\$;dd/mm/yyyy)\$ 29221..40543 etc..
>
> If the dates have a mixed format like...
>
> "12/06/2008", "12/6/2008", "1/10/2007", "2/2/2009" etc
>
> I first have to adjust the given dates to a defined mask.
>
> Flo

That would seem inconsistent. Which brings up my next point, what do we
do with bugs to get Eric's attention. As you know I have recently
discovered two issues that I perceive as bugs. Rather than blast them
out to the world, I have written the smaller development group in hopes
of having them addressed, but to my knowledge they have not been

Should there not be a list on the notetab.com website of known bugs or
errata somewhere that we can add to and then have some response from the
author:
1. will fix first opportunity -- critical bug
2. will fix on some longer schedule
3. cannot fix -- inherent bug caused by some unfixable issue
4. not a bug at all -- intended to function that way

This would allow us to report the error or erratic behavior we are
perceiving, would allow others with issues to become aware of it, and
would give us confirmation that the bug has been registered and placed
on the "I'll look into that list".

In searching to find my two issues I find a number of other perceived
bug reports. Perhaps such a mechanism already exists. But I am unaware.

Here are the two recent bugs I have reported:
We have recently noticed that notetab's strip html command seems a
little uncertain as to what it does.

I am trying to figure one out ....

Use this three line bit as your text to work on:
http://www.domain.com/view.html?ID=11494&t=1
http://www.domain.com/view.html?ID=11494&ti=1

Run this clip:
^!Select All
^\$StrStripHTML("^\$GetSelection\$";FALSE)\$

or this one:
^!Select All
^\$StrStripHTML("^\$GetSelection\$";TRUE)\$

Both come out the same on this test sample.

But look at the end of the first two lines carefully ...
in line one, ...4&t=1 outputs as 4t
but
in line two, ...4&ti=1 outputs as 4&ti=1
As it should I propose. Why is it chopping dropping the & and chopping
everything after the t?

AND

> I have a clip that was working great previously and now is not. I
> suspect that there is a problem with getresubstrings.
>
> I find the email address I am looking for with the following line, but
> the set doesn't set anything.
>
> ^!Find "\r\nEmail: (.*@.*\..*)\r\n" CIWRS
> ^!Set %eMail%=^\$StrLower(^\$GetReSubStrings\$)\$
>
> The email address is highlighted. I suspect a bug in regex or the
> getresubstring command .... or I'm missing something basic, but it
> worked in prior versions of notetab and no longer does.
>
>
I have confirmed that this is not working properly (or like it used to
at least).

Note that I missed a backslash in my find above, but that is/was not the
issue as I had it right in my actual clip:
^!Find "\r\nEmail\: (.*@.*\..*)\r\n" CIWRS
^!Set %eMail%=^\$StrLower(^\$GetReSubStrings\$)\$

Here is what I found:
* used to -- work if there is one (subpattern) in the find in prior
versions of notetab
* now -- only works correctly if there are two or more (subpatt)(erns)
in the find!

I think it should work with just one subpattern found to be honest,
despite the fact there is an s at the end of getresubstringS.

I have copied the list most commonly read by Eric even though this post
is primarily meant for the clips list. I hope that is okay? Is there
still a bugs list and is that commonly read as well? I don't think I am
a member if there is such a list.

I disclose these so that others may find them if they are suffering the
issues I did.

In trying to find my two instances I found several others reporting
perceived bugs. So what is the proper protocol and how can we get
confirmation from Eric?
Your message has been successfully submitted and would be delivered to recipients shortly.