FP 1.2.6: Input + format of date and numbers

  • Volker Börchers

    As Dimitry has mentioned in this post FP 1.2.6 contains new features
    regarding numbers and dates.

    The changes that I have implemented lead to visible, and perhaps sometimes
    surprising changes on input of numbers and dates so I should give you some
    more details about the changes and the reasoning behind them.

    First on data input. This is designed following the example of spreadsheet

    • After editing a node or attribute value the text Freeplane tries to this text as a number or as a date.
    • Parsing is configured via the file <freeplaneuserdir>/scanner.xml. A default version of this file is generated on first Freeplane startup.
    • The configuration specifies which format patterns are tried in which order.
    • Whenever a parser succeeds to consume the whole text the process stops and the parse result is assigned to the node or attribute instead of the text.
    • Parsed numbers and dates receive a default format, i.e. even if you enter a date as 2011-05-15 it will likely be formatted as 5/15/11. The default format depends on the current locale and is configurable via preferences.
    • The most convenient way to enter the date 2011-05-15 is 5/15 for English localization and 15.5 for German and Croatian locale.

    Note: To inhibit parsing put a space in front of the text.

    About formats:

    • The current format of a date/number valued node is displayed in the Format panel.
    • The current format of an attribute value is displayed in the redesigned Attribute part of the Calendar and Attributes panel.
    • After changing the locale the format of all default formatted data is adjusted to the new locale.
    • Formatting is configurable in the file <freeplaneuserdir>/formats.xml
    • Number format can be expressed now also as patterns like #0.####
    • Also percent and currency formats are supported like #.##%

    Planned for the next preview version:

    • improved scripting support for formats
    • The locale setting for formats will be selectable independent of the language localization.

    Currently there are only three different scanner localizations. Your input is
    greatly appreciated both on localized versions of formats.xml and scanner.xml.
    OpenOffice/LibreOffice Calc is a great help since the formatting dialog shows
    the format codes. These should be useable for Freeplane too.


  • Michel Parmentier

    issue / bug :

    in "preferences / behavior / standard date format", if I set it to my format
    (dd/MM/yy), it is not applied automatically to the calendar formats option; so
    while I have my prefs set correctly if I insert a date via the Calendar panel,
    it is inserted into the last selected formats in the formats list.
    So the prefs setting alone doesn't have any effect; you need to edit the
    formats.xml file too.

    Is that the desired behavior ?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks