Skip to main content

UserBirthday

Class

A user's birth month and day, returned by User#birthday.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

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

day

readonly day: number

The day of the month (1-31).

Since

Lens Scripting Version 252


month

readonly month: number

The month of the year (1-12).

Since

Lens Scripting Version 252

Methods

getTypeName()

static getTypeName(): 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

Zodiac

Since

Lens Scripting Version 378

Example

global.userContextSystem.getCurrentUser(function (user) {
if (user.birthday) {
print("Zodiac: " + user.birthday.getZodiac());
}
});