Hey all —

What appears missing that I need at the moment is; Add_month, Add_year


Heh, you got me.  I haven't written add or difference functions for years 
or months yet because those entities represent variable quantities of time 
and the proper approach wasn't quite clear.  For the moment you can hack 
around it with something like:

(= date(year(mydate)+1, month(mydate), day(mydate)) =)

Results might not be what you expect if the month-day isn't applicable to 
the resulting month.  Anyway, I'll add these functions next iteration. 


`ValueError: TypeError: value.asString is not a function value: 
> 20180101001411129`
>

That's an internal error and a rookie mistake on my part.  I'll patch it 
tonight or tomorrow.


Just to make sure it is intentional - concatenation:  1 & 2 = 1.002.00 
> (...i.e 1.00 and 2.00) 
>

OK, so this is a weird one.

When numbers are turned into strings (including by concatenation) they use 
the conversion rules defined for the widget.  Currently you can choose to 
set no rule (in which case fractional numbers tend to print very long), you 
can set fixed point (N digits after zero, as I've done on the wiki's main 
page), or you can set a fixed number of significant digits.  There is not, 
at the moment, any logic to nudge a number like .2500000001 to .25 without 
forcing a format onto it (because the Javascript standard library doesn't 
appear to provide as much).

Anyway, long story short, I could probably stand to implement smarter 
stringification and/or a function that allows the string format to be 
specified on an individual basis.


Apropos binary - additional feature idea: I occasionally want to convert 
> between number bases... hex, dec, binary etc.
>

This isn't hard; I'd probably just make it a new function. 
 

On Sunday, 17 December 2017 20:23:02 UTC-6, Mat wrote:
>
> Evan, 
>
> Just to make sure it is intentional - concatenation:
>
> 1 & 2 = 1.002.00 (...i.e 1.00 and 2.00) 
>
> ... is this supposed to be allowed? A user might expect "= 12" but missed 
> the quote marks because he e.g transcluded the numbers.
>
> I can see use in concatenating numbers if constructing number sequences, 
> e.g binary 0010110001. No decimals then of course. But then maybe that 
> would be strings rather than numbers? I don't have an opinion on this, just 
> asking to make sure it's intentional.
>
> Apropos binary - additional feature idea: I occasionally want to convert 
> between number bases... hex, dec, binary etc.
>
> <:-)
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a168a17c-f538-4098-8cf5-b66e406e0ec2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to