Skip to content

Commit

Permalink
Changing anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
bsiever committed Jun 19, 2020
1 parent 51dbfe1 commit 9e4866c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,19 @@ while (!(input.buttonIsPressed(Button.AB))) {

# Full API

## Setting Time Using 24-hour Format #timeanddate.set24HourTime
## Setting Time Using 24-hour Format #timeanddate_set24HourTime

Use `[timeanddate.set24HourTime()]` to set the time using 24-hour format (hours from 0-23, minutes from 0-59, seconds from 0-59). See [Setting the Time](#setting-the-time).

## Setting Time Using AM/PM Format #timeanddate.setTime
## Setting Time Using AM/PM Format #timeanddate_setTime

Use `[timeanddate.setTime()]` to set the time using am/pm format (hours from 1-12, minutes from 0-59, seconds from 0-59). See [Setting the Time](#setting-the-time).

## Setting the Date #timeanddate.setDate
## Setting the Date #timeanddate_setDate

Use `[timeanddate.setDate()]` to set the date (month from 1-12, day from 1-31, year from 0000-9999). See [Setting the Time](#setting-the-time).

## Getting the Time (string) #timeanddate.time
## Getting the Time (string) #timeanddate_time

```sig
timeanddate.time(timeanddate.TimeFormat.HMM)
Expand All @@ -195,7 +195,7 @@ Provides the current time in the selected format.
If no time has been set, the time will be based on when the micro:bit started (was reset). By default time starts at 00:00.00 on 0000-01-01.


## Getting the Date (string) #timeanddate.date
## Getting the Date (string) #timeanddate_date

```sig
timeanddate.date(timeanddate.DateFormat.MD)
Expand All @@ -215,7 +215,7 @@ Use the timestamp or the ``[timeanddate.numericTime()]`` block to get numeric v

### ~

## Timestamps (string) #timeanddate.dateStamp
## Timestamps (string) #timeanddate_dateStamp

Often a "timestamp" is needed to record events, like when measurements are taken for a science experiment. Use:

Expand All @@ -233,7 +233,7 @@ Use timestamps when logging events that happen over multiple days (more than 24

### ~

## Accessing numeric values of time / date #timeanddate.numericTime
## Accessing numeric values of time / date #timeanddate_numericTime

Numeric values of time/date can be useful for things like alarm clocks. Use:

Expand All @@ -259,7 +259,7 @@ when it had changed to 2020-01-02. The combined date and time would appear to b

### ~

## Advancing and Adjusting Time #timeanddate.advanceBy
## Advancing and Adjusting Time #timeanddate_advanceBy

```sig
timeanddate.advanceBy(amount: number, unit: TimeUnit)
Expand All @@ -273,39 +273,39 @@ It behaves like a mechanical clock: Advancing the minutes causes the hour to adv
for adjusting the clocks accuracy (adding seconds occasionally if it's slow) or adjusting
for changes in timezone or daylight savings time.

## Seconds the Micro:bit has been running #timeanddate.secondsSinceReset
## Seconds the Micro:bit has been running #timeanddate_secondsSinceReset

```sig
timeanddate.secondsSinceReset()
```

Reports the time (in seconds) since the micro:bit started.

## Minute Changing #timeanddate.onMinuteChanged
## Minute Changing #timeanddate_onMinuteChanged

```sig
timeAndDate.onMinuteChanged(handler: () => void)
```
The provided code will run when the minute changes.


## Hour Changing #timeanddate.onHourChanged
## Hour Changing #timeanddate_onHourChanged

```sig
timeAndDate.onHourChanged(handler: () => void)
```
The provided code will run when the hour changes.


## Day Changing #timeanddate.onDayChanged
## Day Changing #timeanddate_onDayChanged

```sig
timeAndDate.onDayChanged(handler: () => void)
```
The provided code will run when the day changes.


## Weekdays #timeanddate.dayOfWeek
## Weekdays #timeanddate_dayOfWeek

Once you have the day, month, and year, you can use them on the:
```sig
Expand All @@ -314,7 +314,7 @@ timeanddate.dateOfWeek()

to determine the day of the week. It returns a numeric code, where 0 is Monday, 1 is Tuesday, etc.

## Day of the Year #timeanddate.dateToDayOfYear
## Day of the Year #timeanddate_dateToDayOfYear

Once you have the day, month, and year, you can use them on the:
```sig
Expand Down

0 comments on commit 9e4866c

Please sign in to comment.