Brian Dunning's FileMaker Custom Functions

GetRelativeDayName ( theDate ; resultLength )

Returns relative day name for today, 7 days in the past, and one day into the future in abbreviated or fully spelled format.

  Average rating: 5.0 (1 vote) Log in to vote

Julio Toledo   Julio Toledo - Show more from this author
Automation USA LLC
https://www.automationusa.net

Share on Facebook Share on Twitter

  Sample input:
GetRelativeDayName ( "1/20/2019; "" )
GetRelativeDayName ( "19/01/2019; "" )
GetRelativeDayName ( "14/01/2019; "" )
  Sample output:
returns "Today" when current host timestamp = "1/20/2019 9:36:21 PM" and language evaluates to default ( English )
returns "Ieri" ( i.e. "Yesterday" ) when current host timestamp = "20/01/2019 21:36:21 PM" and language evaluates to "Italian"
returns "Lundi" when current host timestamp = "19/01/2019 21:36:21 PM" and language evaluates to "French"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Returns relative day name for today, 7 days in the past, and one day into the future in abbreviated or fully spelled format.

Supports eight (8) different system languages (defaults to English)

Examples:

GetRelativeDayName ( "1/20/2019; "" )
returns "Today" when current host timestamp = "1/20/2019 9:36:21 PM" and language evaluates to default ( English )

GetRelativeDayName ( "19/01/2019; "" )
returns "Ieri" ( i.e. "Yesterday" ) when current host timestamp = "20/01/2019 21:36:21 PM" and language evaluates to "Italian"

GetRelativeDayName ( "21/01/2019; "s" )
returns "Mañana" ( i.e "Tomorrow" ) when current host timestamp = "20/01/2019 9:36:21 PM" and language evaluates to "Spanish"

GetRelativeDayName ( "12/01/2019; "short" )
returns "última sex" ( e.g. "última sexta-feira" ) when current host timestamp = "19/01/2019 9:36:21 PM" and language evaluates to "Portugese"

GetRelativeDayName ( "14/01/2019; "" )
returns "Lundi" when current host timestamp = "19/01/2019 21:36:21 PM" and language evaluates to "French"

DEPENDENCIES:
None

KNOWN ISSUES:
May generate nonsensical day name abbreviations and/or non-sensical phrases, particularly in non-European languages.

NOTES:
None

RELEASE:
2019-01-20 - Initial release by Julio Toledo, Automation USA LLC ( www.automationusa.net )

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.