Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting date and time #65

Open
stefjoosten opened this issue Oct 30, 2021 · 1 comment
Open

Formatting date and time #65

stefjoosten opened this issue Oct 30, 2021 · 1 comment
Assignees

Comments

@stefjoosten
Copy link
Contributor

Situation

The following code gives us the current date:


CONTEXT Issue1228  IN ENGLISH

   RELATION sessionToday[SESSION*Date] -- or whatever the DateTime concept is called
   REPRESENT Date TYPE DATE
   ROLE ExecEngine MAINTAINS "Initialize today's date"
   RULE "Initialize today's date": I[SESSION] |- sessionToday;sessionToday~
   VIOLATION (TXT "{EX} SetToday;sessionToday;SESSION;", SRC I, TXT ";Date")
 
INTERFACE Overview : "_SESSION" cRud
BOX [ date : sessionToday cRuD ]

ENDCONTEXT

It produces the following output
afbeelding

Requirement

As an Ampersand user, I want to modify the date-time format, something a bit similar to what I can do in Excel.

Analysis

This is related to issue AmpersandTarski/Ampersand#1089.

Version of Ampersand that was used

Ampersand-v4.3.0 [32141f41cf2af837d59eb57bc73320f4ef48fa00:refs/heads/development]

Steps to reproduce

  1. In your browser, navigate to https://rap.cs.ou.nl
  2. Login and create a new script.
  3. Copy the code above and compile it.
  4. Generate a prototype
  5. Run your prototype
  6. Initialize the database
@Michiel-s
Copy link
Member

For us to implement this elegantly, we first require AmpersandTarski/Ampersand#1089

@Michiel-s Michiel-s transferred this issue from AmpersandTarski/Ampersand Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants