How can I show a members signup date?

Article author
Josh Lopez
  • Updated

Using Memberstack 2.0? There is an updated version of this article here.

Users can show a member's signup date through the data-ms-member="signup-date" attribute. Users can modify the way that the date is displayed by either:

 

1: Adding methods of JavaScript's built-in Date :

<p data-ms-member="signup-date.toDateString()" />
<p data-ms-member="signup-date.getUTCSeconds()" />


2: Adding methods of JavaScript's built-in internationalization API

<p data-ms-member="signup-date.DateTimeFormat('de-DE')" />
<p data-ms-member="signup-date.DateTimeFormat('ko-KO', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric})" />

 

The default date format (6/30/2020) will be outputted if data-ms-member="signup-date" is used without adding a custom method and is toLocaleDateString.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.