$SPECIAL variables
Rhyme provides a comprehensive set of special variables that are automatically available in all apps. These variables give you access to system information, app state, date/time values, and much more.
date & time variables
current date/time
$TODAY
- Current date and time$NOW
- Current date and time (same as $TODAY)$TIMESTAMP
- Current timestamp in milliseconds
formatted dates
$DATE
- Medium format date (e.g., “Jan 15, 2025”)$LONGDATE
- Long format date (e.g., “January 15, 2025”)$SHORTDATE
- Short format date (e.g., “1/15/25”)
formatted times
$TIME
- Medium format time (e.g., “2:30:45 PM”)$LONGTIME
- Long format time with timezone$SHORTTIME
- Short format time (e.g., “2:30 PM”)
date components
$DAY
- Full day name (e.g., “Monday”)$DAYSHORT
- Short day name (e.g., “Mon”)$MONTH
- Full month name (e.g., “January”)$MONTHSHORT
- Short month name (e.g., “Jan”)$MONTHNUM
- Month as number (1-12)$YEAR
- Two-digit year (e.g., “25”)$YEARNUM
- Four-digit year (e.g., 2025)
time components
$HOUR
- Two-digit hour (e.g., “14”)$HOURNUM
- Hour as number (0-23)$MINUTE
- Two-digit minute (e.g., “05”)$MINUTENUM
- Minute as number (0-59)$SECOND
- Two-digit second (e.g., “09”)$SECONDNUM
- Second as number (0-59)
time slots
$TIMESLOTS60
- Array of hourly time slots$TIMESLOTS30
- Array of half-hour time slots$TIMESLOTS15
- Array of 15-minute time slots$TIMESLOTS10
- Array of 10-minute time slots$TIMESLOTS5
- Array of 5-minute time slots
name arrays
$DAYNAMES
- Full weekday names array$DAYNAMESSHORT
- Short weekday names array$MONTHNAMES
- Full month names array$MONTHNAMESSHORT
- Short month names array
app & system information
app details
$APP
- Current app information object$APPNAME
- Name of the current app$APPGROUP
- App group identifier$AID
- App ID$APPICON
- App icon reference$APPBIN
- App binary data$APPBINLEN
- Size of app binary in bytes$VERSION
- VM version
execution context
$BLOCK
- Current block name$BLOCKID
- Current block ID$BLOCKS
- Array of all block names$BLOCKIDS
- Array of all block IDs$PC
- Program counter$STEP
- Current step count
environment
$ENVIRONMENT
- Runtime environment (“browser”, “node”, “worker”, “unknown”)$ENV
- Extended environment information$LANGUAGE
- Current language setting (e.g., “en|US”)$REGION
- Geographic region$PWA
- Whether running as Progressive Web App
user & authentication
$ACCOUNT
- Account information$PLAN
- Current subscription plan$AUTH
- Authentication headers$AUTHMODE
- Authentication mode$AUTHHEADERS
- Generated auth headers
client information
$CLIENT
- Client object$CLIENTID
- Client identifier$CLIENTPASSCODE
- Client passcode$CLIENTTOKEN
- Client authentication token$CLIENTCAN
- Client capabilities object (badge, listen, locate, speak, vibrate)
url & location
$URL
- Full current URL$HOSTNAME
- Current hostname$SUBDOMAIN
- First part of hostname$ORIGIN
- Protocol and hostname$URLPATH
- URL pathname$URLHASH
- URL hash/fragment
colors & styling
$COLORA
- Primary color value$COLORB
- Secondary color value$COLORC
- Tertiary color value$COLORS
- Array of all available colors$APPWIDTH
- Application width setting
system lists
variables & state
$VARIABLES
- Array of all defined variable names$SYSVARS
- Array of all system variable names$VARMETA
- Variable metadata keys$STATE
- Complete state object$VARBUF
- Variable buffer
ui & components
$CUSTELEMENTS
- Custom elements available$CUSTOMELEMENTS
- Registered custom elements$TEMPLATES
- Available templates$UIPOSITIONS
- UI elements with position data$LASTEL
- Last created element
resources
$IMAGES
- Array of loaded image names$ICONS
- Array of available icons$ACTIONS
- Array of all action names$PLUGINS
- Array of loaded plugins
variable metadata
These functions accept a variable name as parameter:
$TYPE["variable-name"]
- Get variable type$AGE["variable-name"]
- Get variable age/timestamp$SIZE["variable-name"]
- Get variable size$COUNT["variable-name"]
- Get variable count$LENGTH["variable-name"]
- Get variable length
miscellaneous
$RANDKEY
- Generate random 32-character key$BUILDOPS
- Build operation keys$CURTABLE
- Current table reference$CACHEKEYS
- Cache keys array$LATEST
- Latest value$SOP
- Last operation$PROD
- Production mode flag$RHA
- RHA flag status$RHB
- RHB flag status$USERS
- User list$USERRECORDS
- User records$SLOTS
- Available slots$SECRETLIST
- List of secret keys$SECRETS
- Secret names
System variables are read-only and automatically updated by Rhyme. They provide real-time information about your app's state and environment.
Date and time variables respect the user's language settings and locale for proper formatting.