UserBirthday
ClassA user's birth month and day, returned by User#birthday.
- Available on all platforms
A user's birth month and day, returned by User#birthday. The month and day are 1-based. Available for both Snapchat and Specs accounts. The birth year is deprecated and only ever populated for the current user.
Index
Properties
Methods
Properties
day
readonlyday:number
The day of the month (1-31).
Since
Lens Scripting Version 252
month
readonlymonth:number
The month of the year (1-12).
Since
Lens Scripting Version 252
Methods
getTypeName()
staticgetTypeName():TypeName<UserBirthday>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<UserBirthday>
getZodiac()
getZodiac():
Zodiac
The zodiac sign corresponding to this birthday.
Returns
Since
Lens Scripting Version 378
Example
global.userContextSystem.getCurrentUser(function (user) {
if (user.birthday) {
print("Zodiac: " + user.birthday.getZodiac());
}
});