Date Format for Date Attributes?

Is there a way to change the format of the way a date is presented for a date attribute?

Specifically I want to show the year as four digits and not two for Start Date and End Date.

My expectation is that there a setting for changing the way a date presents.

Based on what?

I think this this due to the Apple US locale macOS defaults, from which Tinderbox inherits. On my UK-locale system, I see a 4-digit year:

Have you checked: mac OS settings for correct settings?

Thanks Mark:

I didn’t think about the OS. When I looked at system preferences I see the option to define a short, medium and long form of the date but I don’t see a selection for something like preferred.

In general terms I would expect the OS to give the application control of the presentation of the date, if the date is an important parameter.

Based on what?

:slight_smile: Based on 35 years of using a Mac. Seriously I do have an expectation as noted above that where dates are important then in general terms their presentation would be controlled within the application.

My guess is that if you don’t know of a tweak within Tinderbox to change this format then there isn’t one.

thanks for looking.

Also, see $DisplayedAttributesDateFormat, which is probably what you were looking for.

Further to the last reply, that setting for $DisplayedAttributesDateFormat is described here.

Thanks.

FYI: I couldn’t find that panel and so I did some experiments.

Ended up setting $DisplayedAttributesDateFormat to “m/y”. This produces a displayed date of “1/1960”

1 Like

That panel has been there since v6. What version of Tinderbox are you using?

Use menu Edit → Document Settings… or ⌘+8 to open the Document settings dialog. In that dialog, click the Text button in the top toolbar. That swirched the dilaog to this tab:

The ‘Displayed Attributes Dates’ sets the attribute DisplayedAttributesDateFormat to one of three presets. If not happy with any of those choicxes, use Cmd+1 to open the Inspector

Sorry hit the wrong button, but carrying on…

On the Inspector click the System sub-bab. Now use the top (search) input box and type ‘DisplayedAttributesDateFormat’ (no enclosing quotes) and press the Return key. The result will look like this:

Type your desired format string into the Default input box (no quotes) and press the Return key. Now _all Date-type attributes in the Displayed Attributes or Get Info/attributes tables will be displayed using your desired date format.

If you are unable to follow these instructions, please report your OS version and app version.

Answer: V9

The problem is me being lost in a sea of choices. So I appreciate you pointing me in the correct direction.

1 Like

No worries. Choice is confusing. Bear in mind though that Tinderbox is essentially a toolbox where you pick some of the tools from the box as pertinent to your task. So not everyone uses the same tools for the same task. Even for the same task people do things in quite idiosyncratic ways—which is good.

Think “the task I’m trying to do” not “the application I’m more used to using does this differently”. :slight_smile:

New question prompted by preceding dialog here…

I would like Tbx to allow me to input Event dates and display them in Year-Month-Day format (as in 19431102, 1943-11-2, or 1943/11/2 syntax. The year-month-day order is the important part.

I’ve navigated through the Document Inspector to the System panel and the “DisplayedAttributesDateFormat” “Default” entry window. What is the syntax for the string I should enter into the “Default” window to direct Tbx to use a “1943-11-2” date format?

Thanks!

1 Like

Wearing my hat as a former historian I would say there is value in defining one’s own user attributes for dates. I had one for eventYear one for eventMonth and one for eventDay. I also had one that I could set to “circa” or “before” or whatever. This meant that I could set some things as happening in a year and not worry about the rest of the date. One of the most annoying things about using Tinderbox’s own Date attribute was that it would put in a time as well as date, which I rarely wanted. Breaking the date into components also gave me some flexibility further down the line.

2 Likes

@Sherrell see this reference sheet, and use this:

or y-M0-d if you do not want day-of-week zero-padded.

I’m busy with other things today, so I’ll have to check this another time. However, for working in history I’ve always found it essential to roll my own. Information can be vague or incomplete, and I’ve needed to accommodate that. When you have “born about 1756” or “we started our work in the summer of 1942” then conventional date formats just won’t do. Apart from anything else, it is useful to be able to see when you don’t know the exact date that something occurred. Rolling your own gives you much more flexibility.

1 Like

You’re right. Sorry for the assumption.

Paul: Tks! Now I understand how to use the information in Appendix 5 of the Tbx User’s Manual. I knew Tbx could handle ISO-8601 date formats - just not how to enter it.

Martin: Everyone is an historian. Some people (we call them Historians) just are paid for being one. (SMILE)

I agree with you observations about dating flexibility. The ability to employ fuzzy dates is an essential capability. In fact, I have a 230 event timeline I’ve built there as a starting point for this project. The ability to conveniently define “Arcs” in conjunction with AT’s “Subway” view is a powerful way to visualize relationships between events.

My Workhorses for this project are DEVONThinkPro, Aeon Timeline, (currently) Zotero (but I’m still evaluating whether to switch to Bookends), Scrivener, and Tinderbox. I have the most experience with Scrivener and DTP. Probably Zotero after that. My heavy lift is learning enough to use effectively use all these tools. My major TBDs are: (1) how best to capture Event/Timeline information to analyze and display and the workflow between AT and Tbx to do that, and (2) how best capture references and citations (Zotero or Bookends) along with the workflow between Zotero (or Bookends) and Tbx.

The point raised about ‘fuzzy’ (incomplete) dates get to the heart of this. We, without stopping to consider, happily chop between proximate ‘diary’† time where date/time down to the minute and second may matter so warrants consideration, versus broader ‘historical’† times. Do we need to know the state of the tide when Julius Caesar disembarked in Kent to conquer the Britons? The day would be nice but at this distance a year (if known!) would suffice. But, if planning to attend the upcoming departmental meeting nexts a finer granularity than ‘next week’.

Although humans happily chop between these two, code has no such choice. Plus, the two shade into one another. The boundary is subjective. Where ‘the past’ starts will differ for an 80-year-old compared to a 20-year-old.

Tinderbox Date-type attributes are essentially a Date/Time attribute. Indeed, in early documentation they were called that. They can’t not store a time element. Why? because how they work is they store a number—the number milliseconds from a fixed point ‡—and use that to work out the appropriate date/time.

Tinderbox provides date formatting codes (as @PaulWalters noted previously) such that the label we see on screen representing a date/time might appear as “44 BCE” not “1 Jan 44 BCE 00:00:01”, or such.

“Too complicated”, we cry, “the app should, nay must, just figure this out for us”. If only. For the app to do that we’d need to signal out intent, but that’s intuitive to us so we find it hard to articulate … and anyway why can’t the software just guess correctly for us? Plus, the app is a toolset not a per-build limited-scope process.

So what are the pragmatic choices available?

Don’t use Date-type is you don’t need to. You need Date-type data to use timeline view and to do Date-based arithmetic. But if you don’t require either/both those then you might just be better off using a string to hold a date (eq.v. system attribute $PublicationYear is not a Date as it only ever holds a string with the year of publication).

As regards fuzzy/partial dates, you can’t store a Date-type of ‘February 1425’ as there must be a day and time if not given is normally auto-added as system time of day at point if edit. So if you need to use dates, and for some to be missing day or month, it is a good idea to decide on a day/month to use as a default (1 on month vs. end or middle, January vs July, etc.) , record that in your TBX (as you’ll forget) and use that rubric when setting in complete date-type dates.

You can have both if you want, a date type date for use in, for instance, timeline and a string for general use. But again, do note this as if you change one you’ll need to change the other. The app can’t always guess and even then having code constantly look for occasional manual edits is poor use of automation.

Another aspect of fuzzy dates is you don’t have to use just the system $StartDate & $EndDate. You could, add a $NotBeforeDate and $NotAfterDate you give flex for start end. Or, more complex, a $NotStartBefore, $NotStartAfter, $NotEndBefore, NotEndDafter. But, this is an exercise for us the user. If we know we’ll do the same in several projects, make a ‘stub’ document with lots of the customisation pre-done, then for a new projects, copy the stub and use the copy as your project document.

I point to note, is that as the user, you are in charge so make and implement the decisions (within the available toolbox of features).

So whilst doing all the other ‘sandbox’ trials, for a historical project consider what is useful to you in terms of how dates and their many and varied oddities are best annotated in your project going forward.

If looking for help in this it is generally better to ask “I’m planning to do X, does this make sense?” rather than as tends to happen “Is anyone doing X?” Even if they are, likely it is slightly different from your needs, so it’s better to ask form the context of one’s own work. It’s rare somebody has done exactly the same before. But lots of different people may have don similar parts of the whole, albeit in a different context.

HTH

†. The terms/distinctions are mine—doubtless there may be established terms for this of which I’m unaware. Please correct me if so!

‡. From the Unix epoch, if memory serves. But, for almost all of use such underlying detail is moot. A Date/time is a number based on a fixed reference date/time.

1 Like

Wow, Mark. That’s a lot there to digest. Thank you for the detailed tutorial and perspective…
Sherrell

1 Like

Yes, there is a lot. no need to digest immediately. Just there for when it/if becomes pertinent.