use of org.ballerinalang.model.values.BInteger in project ballerina by ballerina-lang.
the class Day method execute.
@Override
public void execute(Context context) {
BStruct timeStruct = ((BStruct) context.getRefArgument(0));
context.setReturnValues(new BInteger(getDay(timeStruct)));
}
use of org.ballerinalang.model.values.BInteger in project ballerina by ballerina-lang.
the class GetDate method execute.
@Override
public void execute(Context context) {
BStruct timeStruct = ((BStruct) context.getRefArgument(0));
BRefValueArray date = new BRefValueArray(getDateTupleType);
date.add(0, new BInteger(getYear(timeStruct)));
date.add(1, new BInteger(getMonth(timeStruct)));
date.add(2, new BInteger(getDay(timeStruct)));
context.setReturnValues(date);
}
use of org.ballerinalang.model.values.BInteger in project ballerina by ballerina-lang.
the class GetTime method execute.
@Override
public void execute(Context context) {
BStruct timeStruct = ((BStruct) context.getRefArgument(0));
BRefValueArray time = new BRefValueArray(getTimeTupleType);
time.add(0, new BInteger(getHour(timeStruct)));
time.add(1, new BInteger(getMinute(timeStruct)));
time.add(2, new BInteger(getSecond(timeStruct)));
time.add(3, new BInteger(getMilliSecond(timeStruct)));
context.setReturnValues(time);
}
use of org.ballerinalang.model.values.BInteger in project ballerina by ballerina-lang.
the class MilliSecond method execute.
@Override
public void execute(Context context) {
BStruct timeStruct = ((BStruct) context.getRefArgument(0));
context.setReturnValues(new BInteger(getMilliSecond(timeStruct)));
}
use of org.ballerinalang.model.values.BInteger in project ballerina by ballerina-lang.
the class Month method execute.
@Override
public void execute(Context context) {
BStruct timeStruct = ((BStruct) context.getRefArgument(0));
context.setReturnValues(new BInteger(getMonth(timeStruct)));
}
Aggregations