• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-3633

entry/12-May-2024-1,5901,459

screenshots/device/12-May-2024-

.gitignoreD12-May-2024100 77

README.mdD12-May-2024991 189

README_zh.mdD12-May-20241.2 KiB3317

build-profile.json5D12-May-20241 KiB4341

hvigorfile.tsD12-May-2024158 21

package.jsonD12-May-2024373 1918

README.md

1# util Tool Function - Scope
2
3### Introduction
4
5This sample app checks whether a value is within a specified scope, calculates the intersection and union sets of two scopes, and calculates the upper and lower limits of a scope.
6
7### Usage
8
91. Enter your age in the text box and touch **Age analysis**. The system checks whether your age is within the specified scope and displays a message to indicate the result.
10
112. Enter your body temperature in the text box and touch **Temperature analysis**. The system checks whether the highest and lowest temperatures are within the average body temperature scope and displays a message to indicate the result.
12
133. Enter your longest sleep time and shortest sleep time in a month in the text boxes, and touch **Sleep analysis**. The system calculates the intersection and union sets of your sleep time and the normal sleep time and displays a message to indicate the result.
14
15### Constraints
16
17This sample can only be run on standard-system devices.
18

README_zh.md

1# 范围判断
2
3### 介绍
4
5本示例主要展示数据的范围判断的功能,通过使用[@ohos.util](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-util.md)提供的范围判断功能去判断某一个数值是否在给定范围内。
6
7使用说明:
8
91.在文本框中输入年龄,点击**年龄分析**按钮,判断您的年龄是否符合工作年龄限制(18-62岁),并弹窗提示。
10
112.在文本框输入一天的体温情况,点击**体温分析**按钮,会根据体温的最大值和最小值判断体温是否在正常范围,同时会有弹窗提示。
12
133.在文本框输入一个月睡眠最长和最短时间,点击**睡眠分析**按钮,会根据输入的睡眠时长计算与正常睡眠时长的并集和交集,并弹窗提示。
14
15### 效果预览
16
17![](screenshots/device/main.png)
18
19### 相关权限
20
21不涉及。
22
23### 相关依赖
24
25不涉及。
26
27### 约束与限制
28
291.本示例仅支持在标准系统上运行。
30
312.本示例仅支持API9版本SDK,版本号:3.2.9.2。
32
333.本示例需要使用DevEco Studio 3.1 Canary1 (Build Version:3.1.0.101, built on November 29, 2022)才可编译运行。