Use substring(), length, and substr() to show the time without the seconds. Use .getHours(), .getMinutes(), and .getSeconds() to format time in a variety of ways.
- [Instructor] If we're using variables…to pull the time dynamically into an Axure prototype,…we might want to show the time in a specific format.…I've got my saved changes exercise file open here,…and when I preview it and click save changes,…the prototype is pulling the current time…with the now variable,…and formatting it using the two locale time string method.…Two locale time string formats the time a certain way.…It has hours, minutes and seconds,…and it also has the AM and PM in all caps.…But that's not the format I want for this design.…
So what we'll do now is reformat the time…so that it only shows the hours and minutes,…and we'll change the AM PM to lowercase.…First, we'll use the slice method…to just get this first part of the time without the seconds.…We'll go back to my prototype,…and click to get into my panel.…And then click on the save changes button.…I'll double click to edit the case…where we're setting the text on our last saved label.…Then I'll click the function button here.…This is where we're pulling that dynamic time…
- Using variables in Axure
- String methods in Axure
- Truncating text strings
- Formatting dates and times
- Setting up a looping animation
- Setting up a responsive background image
- Positioning widgets in the browser
- Repeater and item properties
Skill Level Advanced
1. Widget Properties
3. Dates and Times
4. Window Properties
5. Repeater and Item Properties
6. Global Variables
Global variables2m 14s
Using plugins on Axure Share2m 49s
8. When Things Go Wrong
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.