Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (31 sloc) 644 Bytes
layout language permalink command related_commands
api-command
Java
api/java/sub/
sub
add mul div mod
add/
mul/
div/
mod/

Command syntax

{% apibody %} number.sub(number[, number, ...]) → number time.sub(number[, number, ...]) → time time.sub(time) → number {% endapibody %}

Description

Subtract two numbers.

Example: It's as easy as 2 - 2 = 0.

r.expr(2).sub(2).run(conn);

Example: Create a date one year ago today.

r.now().sub(365*24*60*60);

Example: Retrieve how many seconds elapsed between today and date.

r.now().sub(date);
You can’t perform that action at this time.